Docker image: included software

Thanks Zef. Great implementation.

FWIW: SB_APT_PACKAGES="pandoc ripgrep" does not work for me, since it takes them literally as "pandoc and ripgrep". So I used SB_APT_PACKAGES=pandoc ripgrep.

1 Like

Right yes, I suppose this depends on how and where you enter it. In my compose file I also had to enter it without quotes.

Ok, time to bring up this topic again now that I rewrote the backend in Go and there’s no longer a runtime dependency on Deno. This reopens the idea of building the main docker image on top of Alpine, a much smaller base image and allowing for much faster additional package installation.

My question is: how heavily do people depend on CONTAINER_BOOT page and the legacy SB_APT_PACKAGES environment variables to install additional packages into the docker image? Would adapting these to use Alpine packages be a problem? If so, I may have to go with dual flavor docker images: one based on ubuntu (legacy) and one on alpine (new). If not, I’ll just swap out ubuntu for alpine and be done with it. Packages like pandoc and ripgrep seem to be available so this should be easy.

Let me know if there’s any vetoes against doing this.

1 Like

I personally don’t use the docker images, but if I did, I wouldn’t be using either of these features. You could offer a similar feature in the new container version if you wanted to give people an on-ramp to the new images. Alternatively you could make a slim base image and then have people extend it by making their own Dockerfile and building it (it’s pretty straight forward with docker-compose).

On the main topic of this thread, I think you should probably make the default/recommended docker image have the minimum dependencies for SB to run. Aside from faster downloads, this also makes it easier for package maintainers to build reliable packages for SB.

You could also choose to offer separate “full” and “slim” version tags, so people can build their own containers from a minimal base image, while having a full-fat option for people who just want a turnkey docker image that has a all optional features.

2 Likes

I’ve now swapped the base image for Alpine. It went from a about 300MB to 50MB

5 Likes