Docker
Images
- List images:
docker image ls
- Remove image:
docker rmi <image>
- Purge unused images:
docker image prune
- all:
docker image prune -a
- without query:
docker image prune -a -f
- all:
Container
- List containers:
- running containers:
docker ps
- also stopped containers:
docker ps -a
- running containers:
- Remove container:
docker rm <container>
- Enter container:
docker exec -it <container> bash
- Change restart policy:
docker update --restart=unless-stopped <container>
- Show Environment:
docker exec <container> env
Docker Compose
- Update:
docker compose pull
docker compose build --no-cache
docker compose up -d --force-recreate
Usage Info
Disk Usage
Short Overview:
docker system df
With Details:
docker system df -v
CPU Usage
docker stats