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

Make use of docker-slim #25

Open
Krzmbrzl opened this issue Oct 7, 2022 · 8 comments
Open

Make use of docker-slim #25

Krzmbrzl opened this issue Oct 7, 2022 · 8 comments

Comments

@Krzmbrzl
Copy link
Member

Krzmbrzl commented Oct 7, 2022

See https://github.com/docker-slim/docker-slim

This seems to represent a viable option to further reduce our image's size.

@azlux
Copy link
Collaborator

azlux commented Oct 8, 2022

Do mumble have some dynamic lib load ?
I think qt have dynamic load.

@Krzmbrzl
Copy link
Member Author

Krzmbrzl commented Oct 9, 2022

Idk - I just figured it might be worth a try to see if we can further reduce the image's size 🤷

@maweil
Copy link
Contributor

maweil commented Jan 22, 2024

FYI: I have worked on another solution (manually building a distroless container for mumble) which is still WIP (only tested it with SQLite so far) in my fork of this repo.

I replaced the entrypoint.sh script with a custom built binary built in Rust (still learning it) to get rid of the shell and copied over the required shared libraries from a compatible debian image. It's not yet fully compatible with the official image here (I disabled some features I personally didn't need).

Once I have rebuilt it with the same feature set as the official build, I'll open a PR here.

@maweil
Copy link
Contributor

maweil commented Jan 22, 2024

Do mumble have some dynamic lib load ? I think qt have dynamic load.

Yes, the database drivers are loaded at runtime. Running ldd on the mumble-server binary does not show them.

@murlakatamenka
Copy link

Did you guys consider using Alpine?

Something as simple as this:

FROM alpine:3.19

ENV USER murmur
ENV PORT 64738

RUN adduser ${USER} \
    -DHs /sbin/nologin

RUN apk add --no-cache murmur

RUN mkdir /data && \
    chown -R ${USER}:${USER} /data

COPY --chown=${USER}:${USER} ./murmur.ini /data/murmur.ini

VOLUME /data

EXPOSE ${PORT}/tcp
EXPOSE ${PORT}/udp

USER ${USER}
CMD [ "/usr/bin/murmurd", "-ini", "/data/murmur.ini", "-fg"  ]

generates sub 70 MiB image, pretty good.

There are plenty of Alpine-based images on Dockerhub and on Github.

And you can always have a separate tag for Alpine.

@Krzmbrzl
Copy link
Member Author

Yes we did but there is no support for ZeroC Ice on Alpine (last time I checked at least) which the server uses as a RPC framework.

@murlakatamenka
Copy link

@Krzmbrzl I see, indeed.

For me it's an okay tradeoff to use a smaller image without ZeroC Ice. Separate tag like mumble-server:alpine with notice about not supporting ZeroC Ice can be an option.


mumble is the first project I see that uses that zeroc. Even in Arch repos I see it being used only for mumble:

https://archlinux.org/packages/extra/x86_64/zeroc-ice/ -> See Required by

It gotta be pretty legacy, all the cool kids use web interfaces now, right? Or unix sockets etc. Also docs for interfacing via pretty confusing, but that's another issue.

@Krzmbrzl
Copy link
Member Author

Krzmbrzl commented Mar 3, 2024

Could be done, yeah but would make things for us here more complicated. Not sure this would really be worth it 🤔

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

No branches or pull requests

4 participants