Multi-stage build target
Build only up to a specific stage in a multi-stage Dockerfile
docker build --target builder -t img:builder .
More docker commands
-
docker build --build-arg APP_VERSION=1.2.3 --build-arg ENV=prod -t myapp:1.2.3 .Pass build-time variables to Dockerfile ARG instructions
-
docker buildx build --platform linux/amd64,linux/arm64 -t myapp:latest --push .Build and push multi-arch image using BuildKit
-
docker history --no-trunc <image>Show all layers with full commands and sizes
-
docker export <container> | tar -tvf - | head -30Inspect a container's merged filesystem as a tar stream
-
docker diff <container>Files added (A), changed (C), or deleted (D) in a running container