wagz icon

Skopeo docker archive

wagz | PRO | 09/10/21 04:41:52 AM UTC | 0 ⭐ | 1491 👁️ | Never ⏰ | []
Bash |

620 B

|

None

|

0 👍

/

0 👎

 
One working solution is to use skopeo, a CLI tool for working with remote images registries.
 
An image in environment X is directly saved to disk with the following command:
 
skopeo copy \
  docker://docker.artifactory-x.example.com/busybox:latest \
  docker-archive:./busybox:latest.tar
An image file in environment Y is directly uploaded to Artifactory with the following command:
 
skopeo copy \
  --dest-creds myusername:mypassword \
  docker-archive:./busybox:latest.tar \
  docker://docker.artifactory-y.example.com/busybox:latest
The image does not need to be explicitly retagged to change the repository prefix.

Comments