docker build -t <repo/name>:version .
docker build -t <repo/name>:version --target builder . # Build the specified container in a multistage Dockerfil
docker run ## Run container with specified image docker run -dit --name alpine # Run alpine image with container name and dettached but with a console
docker exec # Run command in the container docker exec -it --name /bin/bash ## Open a console in the container
docker ps docker ps -a docker container ls docker container ls -a
docker inspect <container_id> docker logs <container_id>
docker pause <container_id> docker unpause <container_id> docker container stop <container_id> # Gracefully stop the specified container
docker start <container_id> docker stop <container_id> docker stop -f <container_id>
docker container kill <container_id> # Force shutdown of the specified container docker container rm <container_id> # Remove specified container from this machine docker container rm $(docker container ls -a -q) # Remove all containers
docker image ls -a # List all images on this machine docker image rm # Remove specified image from this machine docker image rm $(docker image ls -a -q) # Remove all images from this machine
docker network create --driver <bridge/host/mcvlan/overlay> network_name docker network ls docker network inspect docker run ... --network <network_name>
docker login # Log in this CLI session using your Docker credentials docker tag username/repository:tag # Tag for upload to registry docker push username/repository:tag # Upload tagged image to registry docker run username/repository:tag # Run image from a registry