forked from number13dev/Ark-docker
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Dockerfile
60 lines (50 loc) · 1.97 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
FROM centos:7
MAINTAINER boerngenschmidt
# Var for first config
ENV SESSIONNAME="Ark Docker" \
SERVERMAP="TheIsland" \
SERVERPASSWORD="" \
ADMINPASSWORD="adminpassword" \
MAX_PLAYERS=70 \
UPDATEONSTART=1 \
BACKUPONSTART=1 \
SERVERPORT=27015 \
STEAMPORT=7778 \
BACKUPONSTOP=1 \
WARNONSTOP=1 \
ARK_UID=1000 \
ARK_GID=1000 \
TZ=UTC
## Install dependencies
RUN yum -y install glibc.i686 libstdc++.i686 git lsof bzip2 cronie perl-Compress-Zlib \
&& yum clean all \
&& adduser -u $ARK_UID -s /bin/bash -U steam
# Copy & rights to folders
COPY run.sh /home/steam/run.sh
COPY user.sh /home/steam/user.sh
COPY crontab /home/steam/crontab
COPY arkmanager-user.cfg /home/steam/arkmanager.cfg
RUN chmod 777 /home/steam/run.sh \
&& chmod 777 /home/steam/user.sh \
## Always get the latest version of ark-server-tools
&& git clone -b $(git ls-remote --tags https://github.com/arkmanager/ark-server-tools.git | awk '{print $2}' | grep -v '{}' | awk -F"/" '{print $3}' | tail -n 1) --single-branch --depth 1 https://github.com/FezVrasta/ark-server-tools.git /home/steam/ark-server-tools \
&& cd /home/steam/ark-server-tools/tools \
&& bash install.sh steam --bindir=/usr/bin \
&& (crontab -l 2>/dev/null; echo "* 3 * * Mon yes | arkmanager upgrade-tools >> /ark/log/arkmanager-upgrade.log 2>&1") | crontab - \
&& mkdir /ark \
&& chown steam /ark && chmod 755 /ark \
&& mkdir /home/steam/steamcmd \
&& cd /home/steam/steamcmd \
&& curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
# Define default config file in /etc/arkmanager
COPY arkmanager-system.cfg /etc/arkmanager/arkmanager.cfg
# Define default config file in /etc/arkmanager
COPY instance.cfg /etc/arkmanager/instances/main.cfg
EXPOSE ${STEAMPORT} 32330 ${SERVERPORT}
# Add UDP
EXPOSE ${STEAMPORT}/udp ${SERVERPORT}/udp
VOLUME /ark
# Change the working directory to /ark
WORKDIR /ark
# Update game launch the game.
ENTRYPOINT ["/home/steam/user.sh"]