Alternative lightweight base image
-
So actually I am totally with (a) following your guidance as to what is best, and (b) using a 300Mb image for simpler packages and (c) continuing to use the full cloudron/base of 2.3Gb where it is justified.
So the plan is use a new base image which will be 300MB and see how it goes. The dev packages are needed for many of the nodejs and ruby programs unfortunately. But it's a start and we can experiment a bit from here.
Really appreciate your feedback and the effort put into the 300MB 'slim' version, especially when your workload is so heavy with 10.x.x.
This was part of the 10.1 work. It brings a new postgres, dovecot etc. All good stuff

-
From a security standpoint, leaving
devpackages out of the runtime container is a Very Good Thing.So, a question (with a clear angle): do
nodejsandrubyprograms need dev tools to run, or do they need dev tools to build?If the former, I'm surprised. If the latter, then a multistage build allows for a slimmer and more secure runtime container.
I could also be confused, which is a common state of being.
-
From a security standpoint, leaving
devpackages out of the runtime container is a Very Good Thing.So, a question (with a clear angle): do
nodejsandrubyprograms need dev tools to run, or do they need dev tools to build?If the former, I'm surprised. If the latter, then a multistage build allows for a slimmer and more secure runtime container.
I could also be confused, which is a common state of being.
-
@jadudm my understanding is dev tools only for building, so multistage build is the way to go, generally and from attack surface perspective.
But Iām no expert.@timconsidine In my day job, we wouldn't be allowed to ship production containers containing dev tools without an exception from an ISSO. I'm also not an expert, but I know that I am not allowed to ship production containers that provide attackers with tools to build further attack tooling from within my app container. (Perhaps that's just a +1.)
-
In this instance, I am referring to (say)
build-essentialon Debian. If I have a C compiler in my runtime image, and someone compromises the host, they can build further tooling in the host because I gave them a hammer and nails.We generally have to follow NIST guidelines, and therefore our containers:
- Are not writeable (generally)
- Contain only the packages necessary to execute the software in the container
- Require allow listing for egress (meaning nothing in the container can talk to the outside world); this implies an egress proxy
- Only allow specific connections in (ingress proxy)
- ...
Cloudron does some of this already. (To be clear: the reason I only use the official packages, and stay up to date, is because I trust the core product. Kudos to y'all, always.)
Hence, the story I'm weaving (which I think Tim is as well) is that there might be a large, common build image for Cloudron (containing all of the build tools), but the runtime image (which a multistage build would copy into) is light/tight and shouldn't contain (say) a C/C++ compiler. You generally can't avoid having your language runtime(s) (e.g.
ruby), but that doesn't mean that the runtime image needs the capability to install new libraries: everything should already be there for the app to execute.Maybe that helps explain my thinking/comment.
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