Save image to tarball

Export an image for air-gapped transfer

docker save img:tag | gzip > img.tar.gz

tool
docker46 commands
tags
docker

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:tag

    Fail pipeline if HIGH or CRITICAL CVEs found

  • docker sbom img:tag

    Generate 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 --build

    Build and start all services in background

all 46 docker commands