|
|
|
|
|
by deiu
1493 days ago
|
|
Oh, that's really nice! What if we can standardize this process in some way? We could have sh scripts for different phases: install-prod-deps.sh, install-dev-deps.sh, run-tests.sh, build.sh, etc. Also, we could have a configuration schema where people define the base images, copy glob patterns, etc. |
|
Surely, this would be useful as part of a platform similar to Heroku where you plug your git repository and it would fetch such scripts and generate the Docker image.
It could be developed as a standalone tool that you integrate in your `git push my-heroku` hook, but I would not use it outside of that use case. Nothing beats copy/paste + some edits :)
> Also, we could have a configuration schema where people define the base images, copy glob patterns, etc.
Yes, copying files from stage to stage is quite a pain at the moment, that is why I have such a Dockerfile for every language I use, the copy glob pattern has already been done for 99% of my use cases.
You need to understand well your toolchain to know what to copy. For example, I did not yet write such a Dockerfile for Rust or Go, where I just do the usual "build + copy binary" multistage. No caching of dependencies :(