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

Use multi stage Docker builds #116

Open
leo opened this issue Aug 13, 2018 · 5 comments
Open

Use multi stage Docker builds #116

leo opened this issue Aug 13, 2018 · 5 comments

Comments

@leo
Copy link

leo commented Aug 13, 2018

First off: Thank you for creating this repository, it's a great start point for people who would like to set up Meteor on Now.

Just one Problem: It's not using multi-stage Docker builds. As a result, all users are currently seeing a limit about their code being above 100MB in size.

This is a hard limit that we put in place in order to make unfreezing much faster on Now Cloud v2.

In turn, it would be great if you could start using multi-stage Docker builds like here.

@qualitymanifest
Copy link

qualitymanifest commented Aug 13, 2018

Came here because I'm having this problem. My app which had previously deployed fine many times is now getting this error. Apparently this limit is not new - I found this comment from a staff member on zeit's slack channel:

we’ve always had this restriction, however we have implemented more checks for limits recently so they might have just started being enacted for your account

Also, yes, thank you very much for creating meteor-now! It's been incredibly useful for me.

@jkrup
Copy link
Owner

jkrup commented Aug 14, 2018

@leo and @qualitymanifest I've started a branch locally to use multi-stage builds to help reduce the ultimate docker image size. Unfortunately the build time goes up somewhat substantially with the current approach, so I'll probably default for it to be off (for those using a paid tier of ∆now) and you'll need to pass a flag like meteor-now -m(--multistage)

@qualitymanifest
Copy link

Cool! I'll keep my eyes peeled for the release. As for whether or not to have multistage builds be the default - from what I understand, the 100MB limit is not lifted with the paid plans. Per an email I got from Sergio at Zeit:

We limited the final built image to 100MiB in all plans.

I imagine most (all?) meteor projects are going to be over 100MB, so you might want to do it the other way around, and have a flag for non-multistage builds.

@bmackio
Copy link

bmackio commented Aug 23, 2018

@jkrup For reference, here's an example @TooTallNate sent us for a meteor deploy using multi-stage deploy: https://github.com/zeit/now-examples/pull/49

@bmackio
Copy link

bmackio commented Aug 28, 2018

I have successfully deployed a meteor app to now using their example app as a guide (https://github.com/zeit/now-examples/tree/master/node-meteor) which employs alpine.

The final size is 51MB. No error and I'm using cloud: v2

edit: actually, it works without the .dockerignore file

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

4 participants