-
Notifications
You must be signed in to change notification settings - Fork 55
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
first try for multi-stage build #4
Conversation
We use two components from boost:
My understanding is that those are header-only libraries required at the build stage so you actually don't need any boost-related package at the run stage. I think that if it weren't for the |
I tried using it without the boost dependency in the running stage, but then requests fail with a I tried to only include I saw the Then I won't do any more on this and we can fix once vroom was updated. Ok for you? |
This won't happen totally because there is still the need for I'm puzzled and not sure the problem comes from either
We may need a bit of digging here, can you spot the error logged by |
should be enough, if vroom is compiled without linking against libosrm.
|
@krypt-n thanks for stepping in!
Could you expand a bit on how we could achieve this? Would this be as simple as replacing the
I don't think we should worry about this (at least for now) in the context of a simple Docker image. |
Ah sorry, I was mistaken. It seems like |
Oh great, thanks so much for the insight @krypt-n ! I'll amend that next week!
Ýeah I agree. In the future, maybe we can extend the Dockerfile to optionally build |
Yep, that worked @krypt-n, thanks again:) Image size now down to 209MB uncompressed, great! |
Fixes #3
Does now a multi-stage build for the final image:
However, even now the final image size is close to 1 GB. The
libboost-all-dev
libs are HUGE! If I leave that out of the image, the final size is only 215 MB, even withlibssl-dev
!So, I'm wondering @jcoupey, can we do it similar to
osrm
and only install the boost components vroom needs to run? They do this in their Dockerfile:Or would that entail a change in the
makefile
? I'm hopeless with C builds..