-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (33 loc) · 1.01 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
# Set the base image to Ubuntu
FROM steamcmd/steamcmd:ubuntu-18
# File Author / Maintainer
LABEL maintainer="Jona Koudijs"
# Set environment variables
ENV TIMEZONE=Europe/Amsterdam
ENV DEBIAN_FRONTEND=noninteractive
ENV USER battalion
ENV HOME /data
################## BEGIN INSTALLATION ######################
# Create the application user
RUN useradd -m -d $HOME $USER
# Create required directories
#RUN mkdir -p $HOME/config
# Install prerequisites
RUN apt-get update -y \
&& apt-get install -y libcurl4 \
&& rm -rf /var/lib/apt/lists/*
# Download the application via steamcmd
RUN steamcmd +login anonymous +force_install_dir $HOME \
+app_update 805140 validate +quit
# Copy configuration
#COPY config/server.cfg $HOME/config/server.cfg
##################### INSTALLATION END #####################
# Expose the default ports
EXPOSE 7777/udp 7777/tcp 27015/udp 27015/tcp
# Switch to user
USER $USER
# Working directory
WORKDIR $HOME
# Set default container command
ENTRYPOINT ["/data/BattalionServer.sh"]
CMD ["-log"]