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

dockerTools.buildImage: passthru image name and tag #43135

Conversation

offlinehacker
Copy link
Contributor

Image name and tag are sometimes needed to refer to image from configuration
and represent an indentifier that developer requested for a docker image.
This commit exposes image name, image tag and full image name
using passthru.

Image name and tag are sometimes needed to refer to image from configuration
and represent an indentifier that developer requested for a docker image.
This commit exposes image name, image tag and full image name
using passthru.
@nlewo
Copy link
Member

nlewo commented Jul 8, 2018

Image name and tag are already exposed (myImage.imageName and myImage.imageTag). So why are they not suitable or sufficient?

@offlinehacker
Copy link
Contributor Author

@nlewo I might be missing something, but i do not see imageName and imageTag exposed using passthru, so i can't really do something like: redis.image.fullName or something like that?

@nlewo
Copy link
Member

nlewo commented Jul 8, 2018

You can:

nix-repl> with (dockerTools.examples.redis); "${imageName}:${imageTag}"
"redis:latest"

Is it what you are trying to do?

Exposing them with passthru just means they are not passed to the builder and not taken into account by the hash calculation.

@offlinehacker
Copy link
Contributor Author

Works for me, thanks for this info :)

@offlinehacker offlinehacker deleted the pkgs/dockerTools/buildImage/expose_name_and_tag branch July 10, 2018 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants