If you have an even moderately complex workflow for developing and releasing your software, you might quickly find yourself wanting to add even more semantic information about your images into its tag than just a simple version number. This can quickly become unwieldy, as you will need to modify your build and deployment tooling whenever you want to add some extra information.
Thankfully, Docker images carry around labels that can be used to store whatever metadata is relevant to your image.
Adding a label to your image is done at build time, using the LABEL instruction in your Dockerfile. The LABEL instruction accepts multiple key value pairs in this format:
LABEL <key>=<value> <key>=<value> ...
Using this instruction, we can store any arbitrary metadata that we find useful on our images. And because the metadata is stored inside the...