forked from shadowpanther/resonite-headless
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
72 lines (54 loc) · 1.98 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
62
63
64
65
66
67
68
69
70
71
72
FROM mono
LABEL name=neosvr-headless maintainer="panther.ru@gmail.com"
ARG HOSTUSERID
ARG HOSTGROUPID
ENV STEAMAPPID=740250 \
STEAMAPP=neosvr \
STEAMCMDURL="https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" \
STEAMCMDDIR=/opt/steamcmd \
STEAMBETA=__CHANGEME__ \
STEAMBETAPASSWORD=__CHANGEME__ \
STEAMLOGIN=__CHANGEME__ \
USER=neos \
HOMEDIR=/home/neos
ENV STEAMAPPDIR="${HOMEDIR}/${STEAMAPP}-headless"
# Prepare the basic environment
RUN set -x && \
apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install curl lib32gcc1 && \
rm -rf /var/lib/{apt,dpkg,cache}
# Add locales
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y locales
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8 && \
update-locale LANG=en_GB.UTF-8 && \
rm -rf /var/lib/{apt,dpkg,cache}
ENV LANG en_GB.UTF-8
# Fix the LetsEncrypt CA cert
RUN sed -i 's#mozilla/DST_Root_CA_X3.crt#!mozilla/DST_Root_CA_X3.crt#' /etc/ca-certificates.conf && update-ca-certificates
# Create user, install SteamCMD
RUN addgroup --gid ${HOSTGROUPID} ${USER}
RUN adduser --disabled-login \
--shell /bin/bash \
--gecos "" \
--gid ${HOSTGROUPID} \
--uid ${HOSTUSERID} \
${USER}
RUN mkdir -p ${STEAMCMDDIR} ${HOMEDIR} ${STEAMAPPDIR} /Config /Logs /Scripts && \
cd ${STEAMCMDDIR} && \
curl -sqL ${STEAMCMDURL} | tar zxfv - && \
chown -R ${USER}:${USER} ${STEAMCMDDIR} ${HOMEDIR} ${STEAMAPPDIR} /Config /Logs
COPY ./setup_neosvr.sh ./start_neosvr.sh /Scripts
RUN chown -R ${USER}:${USER} /Scripts/setup_neosvr.sh /Scripts/start_neosvr.sh && \
chmod +x /Scripts/setup_neosvr.sh /Scripts/start_neosvr.sh
# Switch to user
USER ${USER}
WORKDIR ${STEAMAPPDIR}
VOLUME ["${STEAMAPPDIR}", "/Config", "/Logs"]
STOPSIGNAL SIGINT
ENTRYPOINT ["/Scripts/setup_neosvr.sh"]
CMD ["/Scripts/start_neosvr.sh"]