-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDockerfile
48 lines (38 loc) · 1 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
FROM ubuntu:bionic
LABEL maintainer="Enes Sadık Özbek <es.ozbek.me>"
ENV DEBIAN_FRONTEND noninteractive
ENV GAME_INSTALL_DIR /home/steam/Unturned
ENV GAME_ID 1110390
ENV SERVER_NAME server
ENV STEAM_USERNAME anonymous
EXPOSE 27015
EXPOSE 27016
# Add Steam user
RUN adduser \
--home /home/steam \
--disabled-password \
--shell /bin/bash \
--gecos "user for running steam" \
--quiet \
steam
# Create working directory
RUN mkdir -p /home/steam/Unturned && \
cd /home/steam/Unturned && \
chown -R steam /home/steam/Unturned
VOLUME ["/home/steam/Unturned"]
RUN mkdir -p /opt/steamcmd && \
cd /opt/steamcmd && \
chown -R steam /opt/steamcmd
WORKDIR /opt/steamcmd
COPY . .
# Set perms
RUN chmod +x init.sh && \
chmod +x start_gameserver.sh
# Install required packages
RUN apt-get update && \
apt-get install -y unzip tar curl coreutils lib32gcc1 libgdiplus && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
USER steam
WORKDIR /opt/steamcmd
ENTRYPOINT ["./init.sh"]