Closed 0o-de-lally closed 7 years ago
Well, I did this for several reasons - some preference, some technical limitation. First of all, I feel like it wouldn't be a great developer experience to have to declare arguments in your docker build
command to add dependencies that you want every time (which could easily be the case for something like PhantomJS), so I wanted a way to define those options that would allow you to avoid that and that you can check into source control. I originally wanted to have them as ENV
declarations in your app's Dockerfile, but the ONBUILD
scripts that run those installs happen before the rest of your app Dockerfile is evaluated. So the only option left (other than something in the build command like you suggested) was to add a config file that gets added with your app code.
@jshimko Thanks for the response. What I meant was actually use the Dockerfile ARG, similar to ENV, which allows variables to be used at build runtime. https://docs.docker.com/engine/reference/builder/#/arg
BTW: can I get you input here: https://forums.meteor.com/t/docker-team-up-to-create-a-reference-docker-image-for-meteor/30829
I personally would like to see your implementation be the MDG recommended version.
Thanks @keyscores. I'll take a closer look later today.
Thanks for this repository, it's great, I know nothing about meteor but this has helped a lot to learn the build process and it just works! 🌟
I also agree with @keyscores , personally I find adding a .conf
file means learning yet another convention. I've made a pull request that should make this possible, any thoughts?
Ref PR 9
Most of the environment variable options that were available have now been given --build-arg
flags. See the new build options docs...
https://github.com/jshimko/meteor-launchpad#build-options
For those that prefer it, the launchpad.conf will still work, but now you can also use the --build-arg flag when building your image.
docker build --build-arg INSTALL_MONGO=true -t myorg/myapp:latest .
Firstly, thanks for a well maintained docker image!
Couldn't this use ARG in the dockerfile? IMHO it would be cleaner to have those definitions in one file. https://docs.docker.com/engine/reference/builder/#/arg
Thanks again