Closed vitoyucepi closed 1 month ago
Thanks for this. I definitely would like to ensure it is working, but I want to keep the Debian base - it makes it much easier for me to maintain because I understand Debian's process much better than Alpine
but I want to keep the Debian base
Could you give some insight on how to reduce the footprint of ffmpeg in Debian without recompiling the whole package? Basically, I can do the same Dockerfile, but with python:3.11-slim and 3.5x size.
ensure it is working
I think the provided container image has stopped working since 12d8592b9d3f619361860ee0b839f98263f6abfb. By the way, I've built my own container image on alpine:3.20 with ad-hoc packages and custom patches. And the application works, mostly.
Could you give some insight on how to reduce the footprint of ffmpeg in Debian without recompiling the whole package? Basically, I can do the same Dockerfile, but with python:3.11-slim and 3.5x size.
I would do just that - use 3.11-slim and install ffmpeg from Debian repos. You can remove the apt cache directory /var/lib/apt/lists/*
to reduce the size a bit
Hi @paddatrapper, I've updated the PR, so you could check it.
Thanks! LGTM
:tada: This PR is included in version 1.5.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Summary
I've noticed the main two problems of the
bitcast/mumbleice:dev
container imageI want to reduce the size by using an alpine container image. Make it work.
Details
I use python:3.11-slim because
pymumble
is incompatible with python:3.12-slim. ~For the same reason, I use alpine:3.19.~The python:3.11-slim almost always provides the smaller image without significant changes to the container file, ~but python:3.11-alpine will give an even smaller image when you can properly configure it.~ ~It would be sufficient to use python:3.11-alpine for my purpose, but it has a long-living problem with
find_library
, so I have to use alpine:3.19 instead.~I think that using venv and multi-staged build is one of the most space-efficient ways to containerize a Python application. So, the resulting image is 614MB ~164MB - 10 times less than before~.
Additionally
It's possible to specify the
STOPSIGNAL SIGINT
so the container will stop gracefully, but this problem should be a part of another PR that will add proper signal handling. https://github.com/bitcastza/mumbleice/blob/bfc20b1058b9197fdea728bd0c48309c6a19eab8/mumbleice/bot.py#L65-L71