Skip to content
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

Merged
merged 1 commit into from Oct 16, 2018
Merged

[Docker] Reduce by 200Mb the image size #92

merged 1 commit into from Oct 16, 2018

Conversation

jeanpommier
Copy link
Member

by using ADD --chown

@jeanpommier jeanpommier changed the title [Docker] Reduce by half the image size [Docker] Reduce by 200Mb the image size Oct 15, 2018
@fvanderbiest
Copy link
Member

This looks good, thanks !
Could you list the files which are not shipped anymore in the image ?

@fvanderbiest
Copy link
Member

This could probably be generalized to all geOrchestra docker images.

@landryb
Copy link
Member

landryb commented Oct 16, 2018

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 ?

Copy link
Member

@pmauduit pmauduit left a 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

@fvanderbiest fvanderbiest merged commit 13cd9b1 into georchestra:georchestra-gn3.4-18.06 Oct 16, 2018
@jeanpommier
Copy link
Member Author

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.
I noticed it can also be applied on the postgresql image. I did not look at all the docker images, but, ye, it will probably concern several images.

@fvanderbiest
Copy link
Member

Merged into 18.06 and ported to master.

@pmauduit
Copy link
Member

I think the --chown option has been added quite recently to ADD.

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/
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with ed77e9b

cmangeat pushed a commit that referenced this pull request Sep 9, 2019
DB migration / Drop harvested record first. Fix missing xsi:type on c…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants