Copy an image between registries

Pulls the image, adds a new tag and pushes it to another registry

docker pull src-reg/img:tag && docker tag src-reg/img:tag dst-reg/img:tag && docker push dst-reg/img:tag

tool
docker46 commands
tags
docker

More docker commands

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

    Exports an image to move it into an air-gapped network

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

    Fails the pipeline if HIGH or CRITICAL CVEs are found

  • docker sbom img:tag

    Generates 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

all 46 docker commands