Copy Container Images Like a Pro
Skill Path ( EasyMedium )

Copying a container image from one repository to another is a common DevOps task. Sometimes, it's necessary because the image is changing homes; other times, it's motivated by Docker Hub's aggressive rate limiting; and often, it's simply a matter of "mirroring" public images using the company's internal registry.

In simpler cases, this task can be accomplished with the classic docker pull + docker tag + docker push combo. In more complex scenarios, using specialized tools like crane, skopeo, or regctl may be more efficient. And for copying multi-platform images, understanding remote image composition is essential to getting the job done correctly.

This skill path starts with the basic single-platform/single-tag image copy case and gradually introduces more complex scenarios, such as multi-platform images and copying all image tags from one repository to another.

Have fun!

Challenge 1

When you have just one tag that supports only a single platform, the process of copying the image from one repository to another is pretty straightforward.

Solve this challenge to practice copying a single-platform container image from one repository to another using the most basic docker CLI commands.

Loading challenge...

Challenge 2

Copying images by pulling, re-tagging, and pushing is a simple but not very efficient way. If the target image is large or you don't want to run a highly privileged container runtime on your host just to move some files around, you can use a different set of tools to copy the image more efficiently.

In this challenge, you will practice copying a container image from one repository to another using tools like skopeo, crane, and regctl.

Loading challenge...

Challenge 3

Copying multi-platform images is a bit more complex than copying single-platform images. This is because multi-platform images have multiple variants, each with its own platform and architecture, hidden behind a single "list" tag.

Practice dealing with multi-platform images using docker buildx imagetools, crane, or skopeo in this challenge.

Loading challenge...

Challenge 4

The ultimate image copy challenge is when you need to clone an entire image repository, including all tags and platform variants, to another location. Luckily, if you have already completed the previous challenges in this skill path, you're well prepared for this job.

Loading challenge...

Level up your Server Side game — Join 7,800 engineers who receive insightful learning materials straight to their inbox