Multi-platform build and push

Cross-compile and push directly to registry with BuildKit

docker buildx build --platform linux/amd64,linux/arm64 -t reg/img:tag --push .

tool
docker46 commands
tags
docker

More docker commands

  • docker run --rm -it --env-file .env -p 8000:8000 img:tag

    Local run with env vars from file; --rm auto-removes on exit

  • docker history --no-trunc img:tag

    See each layer, its command, and size; identify bloat

  • docker system prune -af --volumes

    Remove stopped containers, unused images, networks, volumes

  • docker pull src-reg/img:tag && docker tag src-reg/img:tag dst-reg/img:tag && docker push dst-reg/img:tag

    Re-tag and push to another registry

  • docker save img:tag | gzip > img.tar.gz

    Export an image for air-gapped transfer

all 46 docker commands