Build a specific stage
Builds a multi-stage Dockerfile only up to the given stage
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 .Passes build-time variables to ARG instructions in the Dockerfile
-
docker buildx build --platform linux/amd64,linux/arm64 -t myapp:latest --push .Builds and pushes a multi-arch image with BuildKit
-
docker history --no-trunc <image>Shows all layers with full commands and sizes
-
docker export <container> | tar -tvf - | head -30Streams the container filesystem as tar so you can look inside
-
docker diff <container>Files added (A), changed (C) or deleted (D) in a running container