Run container with env file docker
Local run with env vars from file; --rm auto-removes on exit
docker run --rm -it --env-file .env -p 8000:8000 img:tag
more docker
all 46 commands →
Inspect image layers
docker history --no-trunc img:tag
Prune everything unused
docker system prune -af --volumes
Copy image between registries
docker pull src-reg/img:tag && docker tag src-reg/img:tag dst-reg/img:tag && docker push dst-reg/img:tag
Save image to tarball
docker save img:tag | gzip > img.tar.gz
Build with build args
docker build --build-arg VERSION=1.2.3 --build-arg ENV=prod -t img:tag .