-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Slimmer image #11
Slimmer image #11
Conversation
I'm sure @JKE-be could do that for us, despite he looks mean on his picture |
To me it's a great idea but we cannot make this decision. Maybe @antonylesuisse could allow it. |
I'm a bit scared that the not installed packages may be useful to Odoo in some way. Could you provide us a diff of the list of the installed packages? Thanks |
Sure. I should have some time later today to do that. |
I ended up just doing it now 👍 |
Pulling in I've seen confusion in the past about what
|
BTW, I just rebased and force-pushed. Please have a look at that diff at your leisure. |
Also, let me know about whether |
LGTM, @sle-odoo does debian node-less works or do we need npm ? aab commit to 8 please. |
Hi, About splitting the Debian package in multiple lighter packages, in my opinion it's not a good idea. It was the case before (openerp-server, openerp-addons, openerp-web, ...) and was annoying to maintain. The current approach is good and minimize the differences between the way we develop on Odoo and the way we deploy it. Plus, it allow to fully use Odoo offline. Maybe we should create a package that will only use the apps platform to download the addons, but it's not on the to-do list right now. About wkhtmltopdf, i suppose @cecton was willing to ping me. We are already using a custom build of the 0.12.1 version to enable support on Debian Jessie so i suppose we could extract from it only what we need if it's really worth it. I'll have a look. Anyway, removing |
OK. I pushed a commit to another branch that makes the I can add it to this branch if you like, but I wanted to ask about Here's the updated diff: https://gist.github.com/md5/1435dbd8b617ab89bc1d#file-diff-node-less-diff Regarding whether or not to split into other packages, I definitely hear what your saying about the maintenance burden. Still, I hope you guys are able to somehow provide a slimmer download in the future. Despite the fact that people like to talk about how cheap bandwidth, storage, etc. are, it's still not good to waste them (cf. Jevons paradox). Downloading an extra 150+ megabytes per pull for no good reason adds up to a lot of wasted storage and bandwidth over time. Edit: I shouldn't say "no good reason", since there is a good reason to have the addons (just not the unused |
@antonylesuisse just for the record: Total size of the sources: 328MB Maybe we should consider to install nothing but the server and let the server download the addons automatically in ~/.local/Odoo/addons (or apps?). ( @sle-odoo yes actually I was thinking of you but for some reason I chose JKE (O_o) it's okay, I like the idea that a Belmont take care of this situation. Your experience will be of a great help here. Plus, you don't look mean on your picture. ) Best |
I don't have much of an opinion about how exactly you handle the packaging and/or download of addons, but in terms of the Docker image, I could see having an |
What do you guys think about merging this PR and dealing with the |
Hey guys. Any thoughts about whether this can be merged? |
Hi. Thanks for your contribution! |
Glad to help! 👍 |
Offtopic, sorry, @md5 have you any best practice / tools to distinguish buildtime from runtime dependencies or is it basically "going through the code" and "trial and error"? Another thing is that a lot of space is wasted on the final py-pyc dichotomy. For most part of odoo core this only reveals itself on runtime and where it hasn't writing-rights to the source directory might slightly slow down the code interpretation. However as to pip modules, they clearly preserve the py files which basically doubles up their spaces. I'm very interested in ways to avoid this. I've seen that pip is denying a compile-distribute option as per open source ethics (ship the code along with the program) but in container times this is just obsolete... We might continue discuss on this PR until something comes up in the form of a separate PR... EDIT: with respect to the py-pyc I correct myself: It is only relevant if odoo is deployed via it's sources, don;t know if this is the case for the official debian package, I'm not using it. pip doesn't seem like a culprit here. |
A command I might share with you:
It shows the installed package sizes in ubuntu... Hunting for culprits. EDIT: |
@blaggacao I've just done it through trial-and-error for the most part, but I did run across something interesting the I imagine something similar could be done under Debian, possible with In general, the |
I was interested in trying out the
odoo
image today and found that it weighs in at almost a gigabyte!I went through the Dockerfile and the resulting image and made a few changes that resulted in the image dropping from 914+ megabytes to svelte 750 megabytes (ahem):
Much of the remaining bulk is coming from the two deb packages that get installed,
wkhtmltox
andodoo
.In the case of
wkhtmltox
, it's a 121 megabyte package and contains these three beasts:Since you guys appear to be using only the
wkhtmltopdf
binary itself and it is not dynamically linked tolibwkhtmltox.so.0.12.1
, perhaps it would be possible to cut out another 80 megabytes by just including or building the static binary you need in this image.The
odoo
package itself seems to get most of its 293 megabytes from the fact that a whole bunch of addons are included, along with all of their*.po
translations. Not sure if you guys have more targeted*.deb
packages available, but it would be nice to take an approach where there is anodoo
metapackage that pulls in a bunch of smallerodoo-*
packages to allow for a smaller installation based on the Debian packages.