↑ ↓ select, Enter open, Esc close

Docker

Start, watch, debug and clean up containers. Plus Docker Compose, logs, resource usage and reclaiming disk space taken by old images and volumes.

25 one-liners: 16 harmless, 7 caution, 2 destructive

All Docker one-liners

Back up a Docker volume to a tar archive

#docker run --rm -v app_data:/data:ro -v /root/docker-backup:/backup alpine tar czf /backup/app_data.tar.gz -C /data .
caution

Change the restart policy of a Docker container

#docker update --restart unless-stopped app
caution

Clean up unused Docker data

#docker system prune
caution

Copy a file from a Docker container to the host

#docker cp app:/etc/nginx/nginx.conf /root/nginx.conf
caution

Find unhealthy Docker containers

#docker ps --filter health=unhealthy
harmless

Follow Docker container logs live

#docker logs -f --tail 100 app
harmless

For the websites on your server

Free SEO and PageSpeed check

GENLOC.SEO analyzes any domain for load time, Core Web Vitals and on-page issues and tells you in plain words what is going on. Available in 11 languages.

by GENLOC.NETWORK, the team behind myline.de

Follow the logs of all services in a Compose stack

#docker compose -f /opt/app/compose.yaml logs -f --tail 100
harmless

Get the IP address of a Docker container

#docker inspect app | grep '"IPAddress"'
harmless

List all Docker containers including stopped ones

#docker ps -a
harmless

List unused Docker volumes

#docker volume ls --filter dangling=true
harmless

Open a shell in a running Docker container

#docker exec -it app sh
harmless

Remove a Docker Compose stack including its volumes

#docker compose -f /opt/app/compose.yaml down -v
destructive

Remove all unused Docker data including volumes

#docker system prune -a --volumes
destructive

Remove dangling Docker images

#docker image prune
caution

Show CPU and memory usage of Docker containers

#docker stats --no-stream
harmless

Show Docker container logs for a time range

#docker logs -t --since 2h --until 1h app
harmless

Show Docker disk usage by images, containers and volumes

#docker system df -v
harmless

Show the disk usage of Docker containers

#docker ps -a --size
harmless

Show the environment variables of a Docker container

#docker exec app env
harmless

Show the processes running in a Docker container

#docker top app
harmless

Show the published ports of a Docker container

#docker port app
harmless

Show the status of Docker Compose services

#docker compose -f /opt/app/compose.yaml ps -a
harmless

Stop and remove a Docker Compose stack

#docker compose -f /opt/app/compose.yaml down
caution

Update Docker Compose images and recreate containers

#docker compose -f /opt/app/compose.yaml pull && docker compose -f /opt/app/compose.yaml up -d
caution

Validate a Docker Compose file

#docker compose -f /opt/app/compose.yaml config --quiet && echo "Konfiguration OK"
harmless

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.