Multi-platform build and push docker
Cross-compile and push directly to registry with BuildKit
docker buildx build --platform linux/amd64,linux/arm64 -t reg/img:tag --push .
more docker
all 46 commands →
Run container with env file
docker run --rm -it --env-file .env -p 8000:8000 img:tag
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