Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to tag metadata to the docker image #42

Open
makeittotop opened this issue Aug 31, 2017 · 2 comments
Open

Ability to tag metadata to the docker image #42

makeittotop opened this issue Aug 31, 2017 · 2 comments

Comments

@makeittotop
Copy link

Not sure if there is already an option to hand-craft the docker image build name with chosen metadata (example: deployment 'track', version etc) in which case this is probably not needed.

Else it'd be good to differentiate between different images to help perform certain administrative actions.

@rhs
Copy link
Contributor

rhs commented Aug 31, 2017

There isn't any such ability currently, but we could certainly add some flexibility here.

The way forge works depends on being able to deterministically compute the image name based on a hash of all the input sources. You can think of this as an automatically computed "implementation version" (as opposed to a semantic API version). This hash needs to be part of the image name in order for forge to be able to cache docker builds, but we could certainly have a component of the image name that is customizable.

I could also add the ability to add custom labels to docker images. That might be a good place to put some of that information as well.

@tristanpemble
Copy link
Contributor

tristanpemble commented Aug 31, 2017

This is, now that I think about it, kind of increasingly important now that #33 is implemented. Now that you can change the build config depending on environment variables, you can end up with different images with the same project checksum.

Maybe something like:

containers:
  - dockerfile: ./Dockerfile
    tag: {{version}}{%if env.DEBUG %}-debug{% endif %}

With a validation that {{version}} is included in the tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants