-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (41 loc) · 1.49 KB
/
Dockerfile
File metadata and controls
56 lines (41 loc) · 1.49 KB
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
FROM debian:bookworm
RUN apt update && apt -y upgrade
RUN apt -y install --no-install-recommends \
wget \
git \
ca-certificates \
libsdl2-2.0-0 \
libcap2 \
python3-pip \
build-essential
RUN wget https://gist.githubusercontent.com/hakerdefo/5e1f51fa93ff37871b9ff738b05ba30f/raw/7b5a0ff76b7f963c52f2b33baa20d8c4033bce4d/sources.list -O /etc/apt/sources.list
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& echo steam steam/question select "I AGREE" | debconf-set-selections \
&& echo steam steam/license note '' | debconf-set-selections \
&& dpkg --add-architecture i386
RUN apt update && apt -y install --no-install-recommends steamcmd
RUN mkdir /usr/local/nvm
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 22.17.0
RUN wget -O- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
RUN mkdir -p /home/ctrusr /dayz /serverz /profiles
WORKDIR /serverz
COPY package.json package-lock.json healthcheck.sh ./
COPY dist/ dist/
COPY config/ config/
RUN chmod +x healthcheck.sh
EXPOSE 2302/udp
EXPOSE 2303/udp
EXPOSE 2304/udp
EXPOSE 2305/udp
EXPOSE 8766/udp
EXPOSE 27016/udp
EXPOSE 2310
RUN npm install
HEALTHCHECK --interval=30s --timeout=30s --start-period=120s --retries=3 CMD [ "/serverz/healthcheck.sh" ]
CMD ["node", "dist/index.js"]