Docker base image - 3.0
imc67 last edited by
@girish I’m not specialized in this but are locales also part of the base image? If so, then you might add the locales that are also present as language on Cloudron?
@girish on node, perhaps we switch to the nvm stuff?
robi last edited by
Cool, thanks for posting this Girish.
It would be great to test the size before and after docker-slim minification.
@robi We used to have a flatten script back in the day - https://git.cloudron.io/cloudron/docker-base-image/-/commit/734ba25b3493ed1cf9283d8b10b022439bb22309 . I will post the results if I get to running docker-slim.
edit: it seems docker-slim is for application images. our base image is not an application image, it is just a bunch of commonly used libraries. if anything, docker-slim should be run in the app images we build. i thought it was some simple minifier
@girish, maybe I'm sidetracking here, and it's just out of curiosity, I have no horse in this race, but: is there a need for an APP image to be based on Ubuntu?
I understand the need in the base image, lots of libs and binaries and features we need during build time, but what's stopping an app image from, say, using a second
FROMstatement based off of alpine, for example, and just copying whatever it needs?
@malvim Short answer : no, there's nothing stopping an app from not even using the base image at all
Long answer : the idea was to have a single base image, to minimize the combined size of the docker cache by having all the apps share most of their layers, so you don't have a container layer in each app to download each lib & runtime
@malvim To add to what @mehdi said, I have often struggled working with minimalistic images because they often lack the tools for debugging. Often I end up in these alpine images which don't have anything installed, no editors/network tools etc. I am not sure how one works with them. Compared to developer time, a big base image which is just 2GB or so is really costing next to nothing.
Tentative base image is.
Final image is
The apps below work fine:
- Grafana (Go)
- Snipe-IT (PHP 7.4)
- Verdaccio (node)
- Ampache - php 7.4
- GitHub Pages (ruby + locale fixes)
- Metabase (java)
- Moodle - php 7.4
- Peertube - does not support node 14 yet, but next release will. so it's fine.
- Redmine - 4.1 does not support ruby 2.7 yet - https://redmine.org/projects/redmine/wiki/RedmineInstall . so we cannot update it (it's fine)
- GitLab - fails "Could not find openssl-2.2.0 in any of the sources"
Big TODO: port all addons/services.
MooCloud_Matt last edited by
I have often struggled working with minimal images because they often lack the tools for debugging
You will use minimalism only in production, if you are debugging you can use the full tool-set image, but on production you will only include what's is necessary.
In a Apache PHP based app, you don't need 2 web-server, you don't need java or nodejs.
2 GB is from 10% to 5% of a Basic NVMe Cloud instances on most provider, is really a lot of space especially during update, it will take resources and time on server that know days are especially small 2 or 3 vCore and 4 to 8 GB of RAM.
Most of the time your docker image update is longer because CPU bottleneck not network (we have a proxy for the image on docker hub) we have test that.
I don't think is urgent to do or that cloudron need to do it, but i can understand why most of the docker community like small alpine images, and docker is born for that 1 software-1container, but now is thing of the past.
btw if you are using "container layer" with small image stack is better, is how docker work better, a cloudron with just nextcloud don't need to have java on it, that's just w8st of space (jdk is from 160 to 180MB).
You can have:
- Ubuntu base image (with or with out tools that help you debug, depending if is prod or test)
- library that the app need to have to work (webserver, php, java) probably all php apps need the same or can have the same, we don't need to be super efficient, just more efficient
- the app it self, wordpress, nextcloud, ecc ecc.
This can be a possible and probably not so much time consuming to maintain (gitlab ci, is haven in this case), obviously is not the only answer to the image maintenance issue, and one is the big complete image that cloudron is using.
Everything have pros and cons.
And maybe this look like me angry but i'm not, and cloudron support every app that build on there baseimage or build on top of Alpine, so if somebody don't like it, is easy to build a custom app =D.
Lonk last edited by
I'm going to convert my VPN container to this base container as well as update my hot fix to 6.1 on timing. Perfect timing for this new base image.