Easy,  on  Containers Submissions: 57/82

In this challenge, you'll need to push a local image to a remote registry at registry.iximiuz.com. The registry is accessible without authentication from the playground, and the image already exists in the local containerd instance, so you'll only need to tag it and then push to the new home.

First, tag the image as registry.iximiuz.com/nginx:foo.

Hint 1 💡

A single image can have an arbitrary number of names, aka tags, which can be assigned to it using the ctr image tag <existing-name> <new-name> command. The tag in this context means the full image name and not just the part after the colon.

Hint 2 💡

Not sure which image to tag? There should be only one image in the local containerd instance. You can find it using in the ctr image ls output.

Now, push the image to the registry.iximiuz.com/nginx repository.

Hint 3 💡

Surprisingly or not, it's only the (fully-qualified) image name, aka reference, that matters when pushing to a registry. If the image is named example.com:10000/foo/bar:qux, it will be pushed to a registry running on example.com:10000. Since our image is already properly named (aka, tagged), you can push it to the registry by simply running ctr image push.

Hint 4 💡

If the ctr image push command fails with a cryptic ctr: content digest sha256:...: not found error, you're likely trying to push a multi-platform image for which you previously pulled only one platform. There are two ways to fix this: either re-pull the image for all platforms (using the boolean --all-platforms flag), or push only the platform you pulled (using the --platform amd64 flag).

How about cleaning up after yourself? Remove all traces of the local image from the playground. Don't worry about the registry.iximiuz.com registry though - just remove the image from the local containerd instance.

Hint 5 💡

ctr image rm registry.iximiuz.com/nginx:foo didn't do the trick? This is because the image has one or more other names (aka tags). Any image can have multiple names simultaneously - make sure you removed all of them for this particular Nginx image.

Level up your server-side game — Join 6,400 engineers who receive insightful learning materials straight to their inbox