Builder
Build an image (from a dockerfile) | docker buildx build -t {image} -f {dockerfile} {path} |
Images
Pull an image (from remote) | docker image pull {image} |
Push an image (to remote) | docker image push {image} |
List the images | docker image ls |
Remove an image | docker image rm {image} |
Containers
List the containers | docker container ls -a |
Create/+start a container | docker container create/run {image} |
Start/pause/stop a container | docker container start/pause/stop {container} |
Remove a container | docker container rm {container} |
▼ More …
Run container endlessly | docker container run -d {image} sleep infinity |
Execute specific command | docker container exec -it {container} {cmd} |
- -d … Detached mode
- -i … Keep STDIN open
- -t … Allocate a pseudo-TTY
Network
Create a network | docker network create {network} |
Remove a network | docker network rm {network} |
List the networks | docker network ls |
Inspect a network | docker network inspect {network} |
Other
Remove all data | docker system prune -a |