forked from pterodactyl/yolks
-
Notifications
You must be signed in to change notification settings - Fork 272
/
Copy pathDockerfile
40 lines (30 loc) · 1.42 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim AS builder
# Copy and run the build script
COPY build.sh /build.sh
RUN chmod +x /build.sh
RUN cd / && ./build.sh
FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim
# Create necessary directories
RUN mkdir -p /usr/local/bin /usr/local/share/mumble
# Copy the built Mumble server binary and the latest tag file and the build log from the builder stage
COPY --from=builder /usr/src/mumble/git/build/mumble-server /usr/local/bin/mumble-server
COPY --from=builder /usr/src/mumble/git/build/latest_tag.txt /usr/local/share/mumble/latest_tag.txt
COPY --from=builder /usr/src/mumble/build.log /usr/local/share/mumble/build.log
# Install runtime dependencies
RUN apt update \
&& apt -y install curl tar tzdata file ca-certificates sqlite3 iproute2 tini \
&& useradd -m -d /home/container container
# Needed packages to run the mumble server
RUN apt -y install libqt5sql5 libqt5sql5-sqlite libavahi-compat-libdnssd-dev libqt5dbus5 libzeroc-ice-dev libprotobuf-dev qtbase5-dev qtbase5-dev-tools
# Set up user and working directory
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
# Set the stop signal
STOPSIGNAL SIGINT
# Copy and set up the entrypoint script
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Define entrypoint and command
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]