Remove everything unused

Deletes stopped containers and unused images, networks and volumes

docker system prune -a --volumes -f

tool
docker46 commands
tags
docker

More docker commands

  • docker cp <container>:/app/config.yaml ./local-config.yaml

    Copies one file from a running or stopped container

  • docker compose up -d --build --remove-orphans

    Rebuilds and starts services, removes containers that are not in the compose file

  • docker compose up -d --scale worker=5

    Runs 5 replicas of the worker service

  • docker compose logs -f --tail=100 worker

    Shows the last 100 lines of one compose service and keeps following

  • docker network inspect bridge | jq '.[0].Containers | to_entries[] | .value | {Name, IPv4Address}'

    Shows the IPs of all containers in the bridge network

all 46 docker commands