[Dockerfile] Switch to wolfi/glibc based image
Hello ejabberd team,
@badlop as discussed some time ago, during a simple processone/rtb test with the Alpine/musl-libc based container image, I ran into issues when spawning 5-10k users on the container. After digging arround and spending some time, what effectively solved all issues was just using a glibc based variant and the container became well performing.
Switching to the proposed wolfi/os image has the following qualities:
- glibc based container image
- Alpine-like system, up-to-date package, but based on glibc
- still small image sizes compared to Debian-slim and Co.
Additionally, the github workflows could drop the binary builds for musl-libc which have been the work-around also for the QEMU bug blocking building arm64 variants.
Therefore, this PR includes:
- Switched Dockerfile to use
wolfiinstead ofAlpine - Updated the github workflow files to use the output of the installer workflow to build container
packageimages
I was not yet able to test the workflows, maybe need to do some fine tuning here when they have been triggered.
Thanks and until soon! Saarko
coverage: 32.975%. remained the same when pulling fe2b508420db375649be9adf3d958e7e175f1a67 on sando38:wolfi into bc7c8e3952874e7ae22d1ace8bfde13936ef47fc on processone:master.
I was not yet able to test the workflows, maybe need to do some fine tuning here when they have been triggered.
Great! I've added commits that solve workflow run, tarball download, and use same stable Erlang version than the nbinary installers. See this branch: https://github.com/badlop/ejabberd/commits/wolfi/
Now the workflow runs, the container image is generated, and looks great at least with some basic manual testing
$ podman run --name ejabberd -it -p 5222:5222 -p 5280:5280 ghcr.io/badlop/ejabberd:wolfi live
...
14:17:03.953 [info] ejabberd 24.7.13 is started in the node :ejabberd@localhost in 1.26s
$ podman exec -it ejabberd ejabberdctl register admin localhost asd
User admin@localhost successfully registered
And a client can login
Cool, the only thing which will not work is the specification of the OTP_VSN, because Wolfi OS packages only contain the major version in their package name:
https://github.com/wolfi-dev/os/blob/main/erlang-27.yaml
So you would need to set OTP_VSN='26' to keep the same stable major version when using METHOD=direct :) Probably I need to create another PR in the Wolfi repository to include the ODBC package for the erlang-26-odbc package. We need to keep in mind, however, that with the METHOD=direct the MS SQL will not work (#4178)