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

Dockerfile creates two large layers #465

Closed
DougC opened this issue Jan 21, 2015 · 2 comments
Closed

Dockerfile creates two large layers #465

DougC opened this issue Jan 21, 2015 · 2 comments

Comments

@DougC
Copy link

DougC commented Jan 21, 2015

The generated dockerfile is inefficient in the layers it creates. The ADD command comes first and generates a layer with all the application files. For a Play framework application this amounts to at least 39M of libraries. The chown command that is run two lines down then modifies all of those files resulting in a second layer of the same size. (Docker sees a change of ownership as a change to the whole file).

One solution might be to map a volume outside the copy-on-write filesystem where the project files can be added, change their permissions there and then move them into place. This would create a single layer for them.

We're pushing to a repo over a relatively slow internet connection, which really highlights this problem for us.

@muuki88 muuki88 added the docker label Jan 21, 2015
@muuki88
Copy link
Contributor

muuki88 commented Jan 21, 2015

This is a long outstanding issue which has been discussed in

When I have time I will translate my code from #368 into an
additional AutoPlugin, which activates the separation for docker.
However #453 has to be completed before.

@muuki88
Copy link
Contributor

muuki88 commented Jan 21, 2016

#723

@muuki88 muuki88 closed this as completed Jan 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants