Professional Documents
Culture Documents
docker search Search Docker Hub for images docker network ls List networks
searchterm docker network inspect <Network> Inspect a network
docker pull Downloads an image from Docker Hub docker network create <Network> Create a network
user/image
docker network rm <Network> Removes a network
docker login Authenticate to Docker Hub (or other Docker
docker network connect <Network> Connect a container to the
registry)
<Container> network
docker push Uploads an image to Docker Hub. You must be
docker network connect --ip <IP> Specify the IP address of
user/image⠀⠀⠀ authenticated to run this command
<Network> <Container> container interface
docker info Retrieves docker configuration
docker network disconnect <Networ‐ Disconnect container from
docker version Retrieves docker versioning k_Name> <Container> network
docker ps List all running containers Work With Images and Containers
docker ps -a List all container instances, with their ID
docker run -it user/image Runs an image, creating a container and
and status
changing the terminal to the terminal
docker images Lists all images on the local machine within the container
docker history <user>/<i‐ Lists the history of an image docker run -p <hostport‐ Run an image in detached mode with
mage> >:<containerport> -d port forwarding
docker logs <container> Displays the logs from a running user/image
container docker start <container> Start a container
docker port <container> Displays the exposed port of a running docker exec <container> Executes a command within a running
container [shell command] container, e.g. /bin/bash
docker diff <container> Lists the changes made to a container docker attach <containe‐ Changes the command prompt from the
docker logs [-f] <conta‐ Read container stdout r> host to a running container
iner> docker stop <container> Stop a container
docker top <container> Show running processes docker rm -f <container> Delete a container
docker inspect <conta‐ Show container configuration docker create <image>: Create image
iner> <tag>
docker events Show container events docker rmi <image> Delete an image
<container> can be replaced with container name or ID docker tag <user>/<i‐ Add a new tag to an image
mage>:<tag> <user>/<i‐
mage>:<new tag>
ctrl+p then ctrl+q Changes the command prompt from the
host to a running container
Misc. Examples
Options Keywords