11 ms·
Distroless also has variants that bundle runtimes. E.g. `gcr.io/distroless/python3-debian11` is a variant with Python packages. This makes it convenient to bui
by yegle 3y ago
Distroless also has variants that bundle runtimes. E.g. `gcr.io/distroless/python3-debian11` is a variant with Python packages.
This makes it convenient to build&package some Python libraries that require a build step. The process looks like this:
1. Use `debian11` as build env, install `libpython3-dev`
2. Pip install the required packages into a prefix
3. Use `python3-debian11` as the final base image, copy installed file from build env.
Obviously there are other ways to achieve the same goal, but distroless being Debian based makes it easy to rule out any compatibility issues, if you also use Debian as your build env.
For a concrete example here's how I package beancount + fava: https://github.com/yegle/fava-docker https://github.com/yegle/fava-docker