Alternative lightweight base image
-
I’ve published a small "swap-in" alternative to
cloudron/base:5.1for packaging small utility apps:Docker Hub :
tcmbp132021/cloudron-minibase:0.0.1Base image is only 50Mb !!
Apps built with it can be only 200-500Mb.
AppsMonitor, just published as Community App, is only 307Mb.
That compares to 2.5Gb and counting for official full base image packages.Usage (basically same as a regular Cloudron Dockerfile) :
FROM tcmbp132021/cloudron-minibase:0.0.1@sha256:a9c29ddb555b1a33f1e5b3b70c512e3a799cc691770d5016c70e0195e74764e0NOTE : This is not about app runtime performance. The large official base image is usually fine there because Docker layer sharing helps a lot. Apps built with cloudron-minibase use mostly the same runtime memory as if they were built with official base image.
For me, the main issue has been build time and image transfer time.
AppsMonitor, using cloudron-minibase, took 43s for entire build script, start to finish, including building and pushing to container repo.cloudron-minibase is a stripped-down Cloudron-compatible base image with just the basics (it's not alpine or whatever):
bashgosunano- locale support
- CA certs
- common shell/debug tools
It leaves out the big bundled pieces like:
- Node
- Python
- PHP
- Java
- nginx
- Apache
- DB clients
- supervisor
Need any of the excluded pieces ? Just install them.
The app packager pulls into their app only the runtime components the app actually actually needs.cloudron-minibase is built from the official cloudron/base:5.1 image, just removing what is not essential.
Main benefits:
- smaller pulls
- smaller pushes
- faster rebuild cycles
- less unused stuff in app images
- nice fit for simple apps or static binaries
If anyone finds this useful, I can share more details or refine it further.
-
Great initiative @timconsidine . I am quite open to this approach. In fact, I already remove PHP in 5.1 base image (it's an image of it's own called php-base). Node is also on it's way out, this is why it's not in the PATH anymore. Each app package is now explicitly opting in to node.
Locally, my cloudron/base:5.1.0 is 2.42GB! It's insane you got this down to 50Mb . If you can share your Dockerfile, I will incorporate your changes into the base image, if that's ok with you

-
Great initiative @timconsidine . I am quite open to this approach. In fact, I already remove PHP in 5.1 base image (it's an image of it's own called php-base). Node is also on it's way out, this is why it's not in the PATH anymore. Each app package is now explicitly opting in to node.
Locally, my cloudron/base:5.1.0 is 2.42GB! It's insane you got this down to 50Mb . If you can share your Dockerfile, I will incorporate your changes into the base image, if that's ok with you

@girish thank you.
And thanks for not reacting with horror at the approach !

It feels too good to be true but I just asked my AI to check it, and it says 50Mb also.
`tcmbp132021/cloudron-minibase:0.0.1@sha256:a9c29ddb555b1a33f1e5b3b70c512e3a799cc691770d5016c70e0195e74764e0` is a **manifest list**, not a single image. For its actual `linux/amd64` image on Docker Hub: - child manifest: `sha256:85b5d851685962eecb7acfe3adaa77907b023fbe81f09cfc29a722eb03f6c952` - compressed layers total: `52,223,700` bytes - with config: `52,227,752` bytes - size: **49.8 MB** So the practical answer is: **about 50 MB on Docker Hub**.My repo is at https://forgejo.tcjc.uk/cca/cloudron-minibase.git.
Sure, please take whatever you want.
There's a MIT licence on it.Hope you don't find any 'gotchas' !

I thought about producing a series of common deployments :
- cloudron-minibase+node
- cloudron-minibase+python
-etc.
That's more in keeping with a 'batteries-included' philosophy. But I wanted to run it for a while and discover issues. AppsMonitor seems to running fine after a couple of days.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login