Replies: 4 comments 15 replies
-
I'd maybe question this aim:
We're going to need an easy path to build images with development sources of Unit. Is there a way we can use this effort to also achieve that? |
Beta Was this translation helpful? Give feedback.
-
I'm a little leery of elevating downstream distro packages of Unit (or even of Python / PHP / Wasmtime) into being the foundation of our upstream Docker images. What do we do when Python n+1 releases, but isn't available in Debian / Alpine? |
Beta Was this translation helpful? Give feedback.
-
Do we know how we want to approach to runtime versions for the omnibus image? Latest stable for everything? Multiple language versions all in the same image? Combinatoric explosion of images? E.g., I don't think it'd be unreasonable to want (Py311, Py312) × (PHP82, PHP83), etc. |
Beta Was this translation helpful? Give feedback.
-
Hmm, unless I'm missing something, we provide Debian Bookworm packages, take a browse through here |
Beta Was this translation helpful? Give feedback.
-
Hello!
We've been trying to put together a docker image that supports multiple images in a way that's also easy to understand and easy to replicate. Here's where the current state of this is:
Existing images
We provide a few docker images for single language supports or no language support in our repository in the pkg/docker directory.
Each of the language specific image is based on a docker image for that specific language. In PHP 8.3's case, it starts with this:
FROM php:8.3-cli-bullseye
The only outlier is the
-minimal
unit image which starts withdebian:bullseye-slim
.Aim
We're looking to create an image that supports PHP, Python, and WebAssembly out of the box in a single image.
That single image should be easy to develop and understand its inner workings.
Ideally it should either be based on an image where unit is already installed, or unit should be installed easily with something like
apt install unit
orapk add unit
.The point is that instead of having incredibly long sections where we configure and build and configure and build unit and related modules from source, we have individual lines of adding the required software from a package manager of the underlying system and we should be ready to go.
Non-goals
Final docker image size is not something I want to care about at the moment.
Issues we've faced so far
Based on
debian:bookworm-slim
unit
is not available to install as a package. This means we'd have to copy in the entire source code and build it from scratch, which is not something we want to do.Based on
unit:minimal
It's based on
bullseye-slim
(debian 11), where the latest PHP version is 7.4. The slim image out of the box doesn't work when following this guide: https://php.watch/articles/php-8.3-install-upgrade-on-debian-ubuntu#detailedThe
lsb_release
command is not available in the slim image, which results in a malformed entry in the sources file. Fixing that withapt install lsb-release
enables installation of php8.3.Python's version 3.9 is installed, however to install 3.11 or 3.12 we'd need to install python from source, which is not ideal.
Based on the
alpine
imageWasmtime would need to be built from source, but the C compiler version is the other one that is in wasmtime's toolchain.
Otherwise PHP and Python are both available, as well as unit and the language specific extensions on it.
Recap
What do we need to do on our end to make sure we can build a multi-language docker image easily such that a user who knows some docker, some linux package management, but very little about compiling software from source can replicate and customize what we're doing in the image. A pseudo-dockerfile is below:
Beta Was this translation helpful? Give feedback.
All reactions