forked from escapingnetwork/core-keeper-dedicated
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
61 lines (48 loc) · 2 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
###########################################################
# Dockerfile that builds a Core Keeper Gameserver
###########################################################
FROM cm2network/steamcmd:root
LABEL maintainer="[email protected]"
ENV STEAMAPPID 1007
ENV STEAMAPPID_TOOL 1963720
ENV STEAMAPP core-keeper
ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated"
ENV STEAMAPPDATADIR "${HOMEDIR}/${STEAMAPP}-data"
ENV DLURL https://raw.githubusercontent.com/escapingnetwork/core-keeper-dedicated
COPY ./entry.sh ${HOMEDIR}/entry.sh
COPY ./launch.sh ${HOMEDIR}/launch.sh
RUN dpkg --add-architecture i386
# Install Core Keeper server dependencies and clean up
# libx32gcc-s1 lib32gcc-s1 build-essential <- fixes tile generation bug (obsidian wall around spawn) without graphic cards mounted to server
# need all 3 + dpkg i do not know why but every other combination would run the server at an extreme speed - that combination worked for me.
# Thanks to https://www.reddit.com/r/CoreKeeperGame/comments/uym86p/comment/iays04w/?utm_source=share&utm_medium=web2x&context=3
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
xvfb mesa-utils libx32gcc-s1 lib32gcc-s1 build-essential libxi6 x11-utils tini \
&& mkdir -p "${STEAMAPPDIR}" \
&& mkdir -p "${STEAMAPPDATADIR}" \
&& chmod +x "${HOMEDIR}/entry.sh" \
&& chmod +x "${HOMEDIR}/launch.sh" \
&& chown -R "${USER}:${USER}" "${HOMEDIR}/entry.sh" "${HOMEDIR}/launch.sh" "${STEAMAPPDIR}" "${STEAMAPPDATADIR}" \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /tmp/.X11-unix \
&& chown -R "${USER}:${USER}" /tmp/.X11-unix
ENV WORLD_INDEX=0 \
WORLD_NAME="Core Keeper Server" \
WORLD_SEED=0 \
WORLD_MODE=0 \
GAME_ID="" \
DATA_PATH="${STEAMAPPDATADIR}" \
MAX_PLAYERS=10 \
SEASON=-1 \
SERVER_IP="" \
SERVER_PORT=""
# Switch to user
USER ${USER}
# Switch to workdir
WORKDIR ${HOMEDIR}
VOLUME ${STEAMAPPDIR}
# Use tini as the entrypoint for signal handling
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["bash", "entry.sh"]