Challenge, Medium,  on  Containers

Adding labels to images with ctr is easy, but reading them is not so much. Try ctr image ls - you'll see an image called registry.iximiuz.com/tricky-one:latest. This image has a certain label that you need to read.

Write the label value to the /tmp/tricky-label.txt file.

Hint 1 💡

There is likely no out-of-the-box command to read image labels in ctr. You'll have to be creative while solving this challenge.

Hint 2 💡

Image labels is an important part of image metadata, so when you move images around, the labels are always preserved.

Hint 3 💡

Can you think of a way to save the image to a certain artifact on the filesystem?

Hint 4 💡

OCI Image Layout specification is your friend. Or just go and check every file in the tar archive ctr image export produces - in this particular case, there won't be too many.

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