Medium,  on  Containers Submissions: 18/32

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 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 7,000 engineers who receive insightful learning materials straight to their inbox