39 lines
1.3 KiB
Docker
39 lines
1.3 KiB
Docker
FROM debian:bookworm-slim
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& groupadd --system --gid 10001 straywild \
|
|
&& useradd --system --uid 10001 --gid straywild \
|
|
--home-dir /var/lib/straywild-server straywild \
|
|
&& install -d -o straywild -g straywild \
|
|
/opt/straywild-server /var/lib/straywild-server
|
|
|
|
COPY --chown=straywild:straywild \
|
|
dist/straywildServer.x86_64 \
|
|
dist/straywildServer.pck \
|
|
dist/BUILD_INFO \
|
|
dist/SOURCE-CODE.md \
|
|
dist/SHA256SUMS \
|
|
/opt/straywild-server/
|
|
COPY --chown=straywild:straywild \
|
|
config/server.cfg.example /etc/straywild-server.cfg
|
|
COPY --chown=straywild:straywild \
|
|
dist/licenses/ \
|
|
/opt/straywild-server/licenses/
|
|
|
|
RUN chmod 0555 /opt/straywild-server/straywildServer.x86_64 \
|
|
&& chmod 0444 /opt/straywild-server/straywildServer.pck \
|
|
/opt/straywild-server/BUILD_INFO \
|
|
/opt/straywild-server/SOURCE-CODE.md \
|
|
/opt/straywild-server/SHA256SUMS \
|
|
/etc/straywild-server.cfg \
|
|
&& chmod 0444 /opt/straywild-server/licenses/*
|
|
|
|
USER 10001:10001
|
|
WORKDIR /opt/straywild-server
|
|
VOLUME ["/var/lib/straywild-server"]
|
|
EXPOSE 7777/udp
|
|
|
|
ENTRYPOINT ["/opt/straywild-server/straywildServer.x86_64"]
|
|
CMD ["--", "--config=/etc/straywild-server.cfg"]
|