Build with build args docker
Pass build-time variables to Dockerfile ARG instructions
docker build --build-arg APP_VERSION=1.2.3 --build-arg ENV=prod -t myapp:1.2.3 .
more docker
all 46 commands →
Multi-platform build
docker buildx build --platform linux/amd64,linux/arm64 -t myapp:latest --push .
Inspect image layers
docker history --no-trunc <image>
Export container filesystem
docker export <container> | tar -tvf - | head -30
Diff container from image
docker diff <container>
Commit container to image
docker commit -m 'debug snapshot' <container> debug-snapshot:$(date +%s)