Docker Quick Reference

This post is for me a place where to store notes about Docker. I hope that this can be helpful for you.

Basic usage

How do you disable auto-restart on a container? (Ref.)
docker update --restart=no my-container
How can we see all possible variables for a format?
docker container ls -a --format '{{json .}}'
How to analyze disk usage of a Docker container ? (Ref.)
docker ps --size
docker system df --verbose
How to show container bind ports ?
docker port container_name


How to export all images ?
eval $(docker image ls --format 'docker save {{.ID}} -o "{{.ID }}.tar.gz";')

Nessun commento:

Posta un commento