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
[Docker] Reduce by 200Mb the image size #92
[Docker] Reduce by 200Mb the image size #92
Conversation
by using ADD --chown
This looks good, thanks ! |
This could probably be generalized to all geOrchestra docker images. |
I guess the list of files doesnt change, it's just the underlying FS used by docker that does copy-on-write and thus keeps a copy of each files before and after the chown which is actually used ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed with @fvanderbiest, this could be generalized to every webapps
Yes, you're right Landry, that's exactly it. RUN chown in the Dockerfile results in duplication of the files in the image's layers. I think the --chown option has been added quite recently to ADD. |
Merged into 18.06 and ported to master. |
We have then to make sure that the CI on packages.g.o is compatible with this version |
@@ -4,14 +4,15 @@ ENV XMS=1G XMX=6G | |||
|
|||
RUN java -jar "$JETTY_HOME/start.jar" --create-startd --add-to-start=jmx,jmx-remote,stats | |||
|
|||
ADD . / | |||
ADD --chown=jetty:jetty ./var/lib/jetty/webapps /var/lib/jetty/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this copies the contents of the webapps dir into jetty, which is not what is expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed with ed77e9b
DB migration / Drop harvested record first. Fix missing xsi:type on c…
by using ADD --chown