Docker Community Forums

Share and learn in the Docker community.

Release notes with Docker Image

Hello Team,

I am creating a single docker image with the multi microservices project. I want to add microservices-wise version info into the Dockerfile label. I can create individual labels and pass values during image build time. However, I want to know if there are some recommended best practices for the same.
The goal is to fetch version info using docker inspect before creating a container out of it.

Label Schema | Bringing Structure To Labels used to be a thing, but indicates that it was deprecated in favor of Though, I can’t see any suggestions for labels.

Hi @meyay - Thanks for the information. I see lots of helpful labels at
org.opencontainers.image.version seems to be useful. Need to check how to add githash of multiple microservices there.

Good catch! Haven’t been able to find them when I was snooping around on the page :slight_smile:

1 Like

I remember that I used org.label-schema.vcs-ref in the past to store the commit id. The page suggests to replace it with org.opencontainers.image.revision. While version is aimed toward the semantic application versioning. But on the other side a commitid is even more precise then a semantic version :slight_smile: