-
Notifications
You must be signed in to change notification settings - Fork 40
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
Use Dockerfile ARGs #228
Comments
I am not against this change but i'd guess this change would break any existing image as you would have to replace all the template files with a |
Thanks for the comments r71. I working on #215 and was thinking it could simplify kubler, by leveraging docker features. Right now I mostly see The |
Maybe i got your idea wrong. What i meant is that currently every image has a file called I don't mind changing these variables if this helps. But it's up to @edannenberg anyways. |
You understood me right. I was thinking to effectively The way Kubler is right now, before a build, you have the |
The use of
ARG
in Dockerfiles could allow vanilla use of Dockerfiles without theDockerfile.template
source. Instead ofengine/docker.sh
using thegenerate_dockerfile()
function, thedocker build
steps could pass the appropriate build args.Docker build reference: https://docs.docker.com/build/guide/build-args/
Dockerfile Reference for
ARG
: https://docs.docker.com/engine/reference/builder/#argLeveraging the dockerfile feature could simply kubler.
For example instead of having
images/figlet/Dockerfile.template
:We could have
images/figlet/Dockerfile
:and remove
Dockerfile
from.gitignore
.When Kubler was first written Docker at the time didn't support Dockerfile Build
ARG
s for templating Dockerfiles. It was added in Docker 1.9 (2015-11-03)https://docs.docker.com/engine/release-notes/prior-releases/#builder-6
I'm happy to work on a PR for this. Does anyone foresee any issues with removing the templating feature and moving to build args? Besides the fact that end users will need to migrate their Dockerfiles.templates to Dockerfiles (adding the
ARG
directives).The text was updated successfully, but these errors were encountered: