| Term | Explaination |
|---|---|
| Image | Describe stack |
| Volume | Data space storage |
| Container | Running stack |
To prevent some permission denied message
sudo usermod -aG docker $USER
Apply the group changes to the current terminal session
newgrp docker
docker ps -ato list all container running or notdocker rm <container_id>to … remove itdocker rm $(docker ps --filter status=exited -q)remove all exited containers
# Dockerfile
FROM ubuntu:22.10
RUN apt update
RUN apt install -y git zshdocker build -t author/project:tag <path folder with Dockerfile>
docker run -it <container:default_tag_latest> zsh
echo $0 to check current shell
The docker system prune command is a shortcut that prunes images, containers, and networks.
Volumes are not pruned by default, and you must specify the --volumes flag for docker system prune to prune volumes.
docker system prunedocker volume prunedocker container prunedocker image prune