Save image to tarball
Export an image for air-gapped transfer
docker save img:tag | gzip > img.tar.gz
More docker commands
-
docker build --build-arg VERSION=1.2.3 --build-arg ENV=prod -t img:tag .Pass build-time variables into Dockerfile ARG instructions
-
trivy image --exit-code 1 --severity HIGH,CRITICAL img:tagFail pipeline if HIGH or CRITICAL CVEs found
-
docker sbom img:tagGenerate Software Bill of Materials for an image (Docker Desktop)
-
docker inspect <container> | jq '.[0].NetworkSettings.Networks'Drill into network settings of a running container
-
docker compose up -d --buildBuild and start all services in background