Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dockerfile] Switch to wolfi/glibc based image #4261

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sando38
Copy link
Contributor

@sando38 sando38 commented Jul 20, 2024

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 wolfi instead of Alpine
  • Updated the github workflow files to use the output of the installer workflow to build container package images

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

@coveralls
Copy link

coveralls commented Jul 20, 2024

Coverage Status

coverage: 32.975%. remained the same
when pulling fe2b508 on sando38:wolfi
into bc7c8e3 on processone:master.

@badlop
Copy link
Member

badlop commented Jul 23, 2024

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

@sando38
Copy link
Contributor Author

sando38 commented Jul 23, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants