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

Utilize multi-stage builds #58

Open
Ulexus opened this issue Mar 14, 2018 · 4 comments
Open

Utilize multi-stage builds #58

Ulexus opened this issue Mar 14, 2018 · 4 comments

Comments

@Ulexus
Copy link
Member

Ulexus commented Mar 14, 2018

Now that Docker finally supports multi-stage builds, we should use them in order to reduce the footprint of the resulting images (separating build requirements from runtime requirements).

@smeijer
Copy link

smeijer commented Sep 29, 2018

This would be really awesome.

Have the benefits of both run types.

The easy (and reproducible) container from Source mode, but still the small final size of the Pre-bundled mode.

@Ulexus
Copy link
Member Author

Ulexus commented Sep 29, 2018

This appears to not be quite as simple as I had hoped, but it should still be doable. I just haven't had the time to devote to it yet.

PRs always welcome. :)

@smeijer
Copy link

smeijer commented Sep 29, 2018

Can you tell a little about the struggle you've been experiencing? Perhaps sharing the knowledge can lead to a solution.

@Ulexus
Copy link
Member Author

Ulexus commented Sep 29, 2018

Essentially, the later versions of meteor expect to compile dependencies on the deployment machine. This used to be done preliminarily during the bundling phase, but more and more often, run-time compilation is needed.

In some respects, multi-stage builds will actually help this. Most of the mismatches have been caused by people creating the bundle on one architecture and deploying on another, mandating recompilation. A multi-stage build would mostly fix this kind of problem, since it would be expected that the same architecture would be used for building the container image as for running.

I just haven't done any testing to see if that is sufficient.

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