Replies: 3 comments
-
The base Unit image https://github.com/nginx/unit/blob/master/pkg/docker/Dockerfile.python3.11#L1 FROM python:3.11-bullseye |
Beta Was this translation helpful? Give feedback.
-
Yes, but the container contains a lot of stuff that is useless - like hundreds of megabytes of docs. |
Beta Was this translation helpful? Give feedback.
-
We may reconsider using the Python official image as the base. In the meantime, this will produce a more compact image (~125MB) but note that it uses the version of Python packaged for Debian and not the latest version provided by the Python community. FROM unit:minimal
RUN curl --output /usr/share/keyrings/nginx-keyring.gpg https://unit.nginx.org/keys/nginx-keyring.gpg && \
printf "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/debian/ bullseye unit\ndeb-src [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/debian/ bullseye unit" > /etc/apt/sources.list.d/unit.list
RUN apt update && apt-get install -y unit-python3.9 && rm -rf /var/lib/apt/lists/* |
Beta Was this translation helpful? Give feedback.
-
I like what I see with unit, but the container is way to large, almost a GB. It must be possible to make that much smaller and more portable. I looked inside the python one, and it had linux docs and all kinds of stuff in it.
Beta Was this translation helpful? Give feedback.
All reactions