[docker] Reduce the context to load at build time#441
[docker] Reduce the context to load at build time#441jeanpommier wants to merge 1 commit intogeorchestra:masterfrom
Conversation
|
@jeanpommier can we merge ? How to test ? |
|
I believe we can even make it more strict and exclude the web/target folder. Looking at the Dockerfile, the only source it is copying from right now is the docker/ folder. This is thus the only one that needs to be included in the context. Testing ? I'd say that if it builds, it should be fine. This is just about the files that are loaded in memory by docker when it build the image. By default, it copies the whole bunch of files lygin around rhe Dockerfile. Here, we reduce to what is useful only (the built war file, actually) |
|
Seems clear to me. |
|
Nope, don't. This PR is more than 1Y-old, I need to dedicate it a few minutes at least to check the docker image will still build. I really don't see what could go wrong, but you're never to careful |
|
What is the docker build process, BTW ? I can see one in the GH actions, but I can't see any reference/documented build process for the docker image, apart from that. Did I overlook something ? |
|
Wasn't there a maven target to build the docker image ? |
|
OK @pierrejego , you can merge, I builds, it runs. And it prevents you from loading more than 2Gb of context during the build process |
|
Just passing by. |
|
Hi, |
Load only folders that are used in the Dockerfile
bbf8a1b to
318480a
Compare
edevosc2c
left a comment
There was a problem hiding this comment.
Ok.
But ideally you shouldn't be doing that if the Dockerfile was able to compile the application from the code directly. (not requiring to already compile it from outside of docker)
But that's another take...
agreed |
Using .dockerignore file allows to reduce drastically the context loading on the docker build (1,5G -> 200Mb)