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

big duniverses exceed layer count in depext calculation #85

Closed
avsm opened this issue Dec 19, 2019 · 3 comments
Closed

big duniverses exceed layer count in depext calculation #85

avsm opened this issue Dec 19, 2019 · 3 comments

Comments

@avsm
Copy link
Member

avsm commented Dec 19, 2019

The COPY and opam pin strategy for depext calculation leads to a large number of layers in the resulting Dockerfile. There is a limit (127) of these in the engine, which leads to build failures.

I think we need a more efficient (but still cache-friendly) way to do the opam pin / depext dance that doesn't add a lot of layers. Some options:

  • copy all the opam files into a single directory and then pin them all there. This would let it work in a single COPY command.
  • we could create a new layer for all the opam pins, and subsequently roll that back.

I suspect the first option is best...

@talex5
Copy link
Contributor

talex5 commented Dec 19, 2019

Another way would be to tar them up and then ADD the tar file (Docker might even untar it automatically; can't remember).

@avsm
Copy link
Member Author

avsm commented Dec 19, 2019

indeed! This is supported with ADD: https://docs.docker.com/engine/reference/builder/#add

If is a local tar archive in a recognized compression format (identity, gzip, bzip2 or xz) then it is unpacked as a directory. Resources from remote URLs are not decompressed. When a directory is copied or unpacked, it has the same behavior as tar -x, the result is the union of:

@talex5
Copy link
Contributor

talex5 commented May 11, 2020

Was fixed in #142.

@talex5 talex5 closed this as completed May 11, 2020
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

No branches or pull requests

2 participants