-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
61 lines (46 loc) · 1.75 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
#BUILD THE RCON-CLI PACKAGE
FROM golang:1.23.1-alpine AS rcon-cli_builder
ARG RCON_VERSION="0.10.3"
ARG RCON_TGZ_SHA1SUM=33ee8077e66bea6ee097db4d9c923b5ed390d583
WORKDIR /build
# install rcon
SHELL ["/bin/ash", "-o", "pipefail", "-c"]
ENV CGO_ENABLED=0
RUN wget -q https://github.com/gorcon/rcon-cli/archive/refs/tags/v${RCON_VERSION}.tar.gz -O rcon.tar.gz \
&& echo "${RCON_TGZ_SHA1SUM}" rcon.tar.gz | sha1sum -c - \
&& tar -xzvf rcon.tar.gz \
&& rm rcon.tar.gz \
&& mv rcon-cli-${RCON_VERSION}/* ./ \
&& rm -rf rcon-cli-${RCON_VERSION} \
&& go build -v ./cmd/gorcon
#BUILD THE SERVER IMAGE
FROM cm2network/steamcmd:root
RUN apt-get update && apt-get install -y --no-install-recommends \
gettext-base=0.21-12 \
procps=2:4.0.2-3 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=rcon-cli_builder /build/gorcon /usr/bin/rcon-cli
LABEL maintainer="[email protected]" \
name="indifferentbroccoli/projectzomboid-server-docker" \
github="https://github.com/indifferentbroccoli/projectzomboid-server-docker" \
dockerhub="https://hub.docker.com/r/indifferentbroccoli/projectzomboid-server-docker"
ENV HOME=/home/steam \
CONFIG_DIR=/project-zomboid-config \
ADMIN_USERNAME=admin \
ADMIN_PASSWORD=admin \
DEFAULT_PORT=16261 \
UDP_PORT=16262 \
RCON_PORT=27015 \
SERVER_NAME=pzserver \
STEAM_VAC=true \
USE_STEAM=true \
GENERATE_SETTINGS=true
COPY ./scripts /home/steam/server/
COPY branding /branding
RUN mkdir -p /project-zomboid /project-zomboid-config && \
chmod +x /home/steam/server/*.sh
WORKDIR /home/steam/server
HEALTHCHECK --start-period=5m \
CMD pgrep "ProjectZomboid" > /dev/null || exit 1
ENTRYPOINT ["/home/steam/server/init.sh"]