Hey! I’m making a container right now and the size difference between mainline alpine and the raspberry-pi-alpine package is massive! Currently the size of the raspberry-pi-alpine package is 20MB, but in the past it has been 168MB. I’m just wondering where this size is coming from, am I misunderstanding the tags? Furthermore, the regular alpine repository is only 5MB, which I’m going to try and use now since all I need to run is haproxy in it.
Hey @matthewcroughan, you can read more about our base images in the documentation: https://www.balena.io/docs/reference/base-images/base-images/
As you see in your screenshot, the larger images are the
build variants, the smaller ones are the
run variants (if no
run is shown, then it’s s
run version). See the difference between those two variants here https://www.balena.io/docs/reference/base-images/base-images/#run-vs-build but in a nutshell,
build has a bunch of tools installed that are regularly needed for building different software, and that can be used as part of a multistage build. See here about picking a base image better: https://www.balena.io/docs/reference/base-images/base-images/#how-to-pick-a-base-image
I wonder if regular alpine repository that you mention, does work for a Raspberry Pi. The size difference I believe can be because our Raspberry Pi alpine base image also installs some Raspberry Pi libraries, see eg. this dockerfile for
The “architecture” base image,
balenalib/rpi-alpine is smaller, I think (about 15MB vs 20B of
3.10-run in both cases), and also installs a few dependencies that make life easier on tht base image, does add the balena modifications, and also add possibility of cross-compiling (e.g. when you do
balena build --emulated on your local non-ARM computer to still be able to build the images)
If you want to use a small image with haproxy, check out our example in the
multicontainer-getting-started project which as exactly that, and as simple as this:
Hope this helps and explains some of the things you’ve seen! Please let us know if you have any other questions!