docker-builds
docker-builds copied to clipboard
LABEL container.version --> LABEL dockerfile.version
LABEL container.version is super vague. It should be LABEL dockerfile.version. Intended for tracking multiple versions of a dockerfile for a single program (and it's single version).
For example if I had to make adjustments to the SPAdes 3.14.1 dockerfile (for which there is only one dockerfile version currently), I would bump to LABEL dockerfile.version=2
Could you give an example of how you want this to look?
LABEL dockerfile.version="1" for the first iteration of a dockerfile. Then if you had to tweak the dockerfile at a later date, but not change the version of the actual program (SPAdes or whathave you), then I would change it to LABEL dockerfile.version="2" when commiting the edited dockerfile to the repo.
IMO semantic versioning isn't necessary here because I don't expect dockerfiles to change much once they are running smoothly and I would like to keep it simple.
Happy to hear your thoughts on this.
The label is correct in the template, right?
https://github.com/StaPH-B/docker-builds/blob/master/dockerfile-template/Dockerfile
@kapsakcj , do you think we need to add/change labels?
Yes, the template has the correct LABEL (dockerfile.version).
The only slight change for the template would be something like this, if multiple people are maintainers or authors of the dockerfile:
LABEL maintainer1="Anders Goncalves da Silva"
LABEL maintainer1.email="[email protected]"
LABEL maintainer2="Curtis Kapsak"
LABEL maintainer2.email="[email protected]"
I want to ensure that each docker image has the recommended labels, so I added a check in https://github.com/StaPH-B/docker-builds/pull/499.
I had a difficult time adding wildcards when using docker inspect to look at labels, so I'm going to recommend that the first maintainer is maintainer and the nth maintainer is maintainer$n. So the recommendation would look like this:
LABEL maintainer="Anders Goncalves da Silva"
LABEL maintainer.email="[email protected]"
LABEL maintainer2="Curtis Kapsak"
LABEL maintainer2.email="[email protected]"
I think we can close this issue now.