Save an image to an archive
Exports an image to move it into an air-gapped network
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 .Passes build-time variables to ARG instructions in the Dockerfile
-
trivy image --exit-code 1 --severity HIGH,CRITICAL img:tagFails the pipeline if HIGH or CRITICAL CVEs are found
-
docker sbom img:tagGenerates a Software Bill of Materials for an image (Docker Desktop)
-
docker inspect <container> | jq '.[0].NetworkSettings.Networks'Shows the network settings of a running container
-
docker compose up -d --buildBuilds and starts all services in the background