# Why does the raspberry-pi-alpine image fluctuate between 20-168MB?

**URL:** <https://forums.balena.io/t/why-does-the-raspberry-pi-alpine-image-fluctuate-between-20-168mb/22601>\
**Category:** Product support\
**Tags:** docker\
**Created:** [July 27, 2019, 2:37am UTC](https://forums.balena.io/t/why-does-the-raspberry-pi-alpine-image-fluctuate-between-20-168mb/22601 "2019-07-27T02:37:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthewcroughan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/matthewcroughan/32/9424_2.png) [@matthewcroughan](https://forums.balena.io/u/matthewcroughan)\
**Post date:** [July 27, 2019, 2:37am UTC](https://forums.balena.io/t/why-does-the-raspberry-pi-alpine-image-fluctuate-between-20-168mb/22601/1 "2019-07-27T02:37:20Z")

</div>

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.

[https://hub.docker.com/r/balenalib/raspberry-pi-alpine/tags?page=4](https://hub.docker.com/r/balenalib/raspberry-pi-alpine/tags?page=4)

 ![image](https://global.discourse-cdn.com/balena/original/2X/e/eebaa0f825599f1724c657bf6f5b38dc87d8b392.png)

---

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [July 29, 2019, 8:22am UTC](https://forums.balena.io/t/why-does-the-raspberry-pi-alpine-image-fluctuate-between-20-168mb/22601/2 "2019-07-29T08:22:49Z")

</div>

Hey @matthewcroughan, you can read more about our base images in the documentation: [https://www.balena.io/docs/reference/base-images/base-images/](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 `build` or `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](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](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 `3.10-run`:

> <https://github.com/balena-io-library/base-images/blob/7813301a48cd8a3631d51d0cc5ecdf6ae605e35e/balena-base-images/device-base/raspberry-pi/alpine/3.10/run/Dockerfile>

The “architecture” base image, `balenalib/rpi-alpine` is smaller, I think (about 15MB vs 20B of `raspberry-pi-alpine` for `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)

> <https://github.com/balena-io-library/base-images/blob/7813301a48cd8a3631d51d0cc5ecdf6ae605e35e/balena-base-images/rpi/alpine/3.10/run/Dockerfile>

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:

> <https://github.com/balena-io-projects/multicontainer-getting-started/blob/master/haproxy/Dockerfile.rpi>

Hope this helps and explains some of the things you’ve seen! Please let us know if you have any other questions!
