forked from sairuk/docker-tribesnext-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
112 lines (74 loc) · 2.27 KB
/
Dockerfile
File metadata and controls
112 lines (74 loc) · 2.27 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Multi-Stage Build (TacoServer)
# This stage compiles the various resources that make up TacoServer
FROM alpine:3.10 as tacobuilder
RUN apk --update add git sed less wget nano openssh && \
rm -rf /var/lib/apt/lists/* && \
rm /var/cache/apk/*
WORKDIR /tmp
RUN git clone --depth 1 "https://github.com/ChocoTaco1/TacoServer/" && cd ./TacoServer \
&& git checkout "a03ff8f66ef7b3e12b3a8514aed8eecf76a50c6c"
WORKDIR /tmp
RUN git clone --depth 1 "https://github.com/ChocoTaco1/TacoMaps/" && cd ./TacoMaps \
&& git checkout "908d952c04caf01091af70c3791b4606bc94395a"
WORKDIR /tmp
# Main Game Server Image
FROM multiarch/debian-debootstrap:i386-jessie
LABEL maintainer="sairuk, amineo, chocotaco"
# ENVIRONMENT
ARG SRVUSER=gameserv
ARG SRVUID=1000
ARG SRVDIR=/tmp/tribes2/
ENV INSTDIR=/home/${SRVUSER}/.wine/drive_c/Dynamix/Tribes2/
# UPDATE IMAGE
RUN apt-get -y update && apt-get -y upgrade
# DEPENDENCIES
RUN apt-get -y install \
# -- access
sudo unzip \
# -- logging
rsyslog \
# -- utilities
sed less nano vim file \
# --- wine
wine \
# -- display
xvfb
# CLEAN IMAGE
RUN apt-get -y clean && apt-get -y autoremove
# ENV
# -- shutup installers
ENV DEBIAN_FRONTEND noninteractive
# USER
# -- add the user, expose datastore
RUN useradd -m -s /bin/bash -u ${SRVUID} ${SRVUSER}
# -- temporarily steal ownership
RUN chown -R root: /home/${SRVUSER}
# SCRIPT - installer
COPY _scripts/tribesnext-server-installer ${SRVDIR}
RUN chmod +x ${SRVDIR}/tribesnext-server-installer
RUN ${SRVDIR}/tribesnext-server-installer
# SCRIPT - server (default)
COPY _scripts/start-server ${INSTDIR}/start-server
RUN chmod +x ${INSTDIR}/start-server
# CLEAN UP TMP
COPY _scripts/clean-up ${SRVDIR}
RUN chmod +x ${SRVDIR}/clean-up
RUN ${SRVDIR}/clean-up
# TacoServer - Pull in resources from builder
COPY --from=tacobuilder /tmp/TacoServer/Classic/. ${INSTDIR}GameData/Classic/.
COPY --from=tacobuilder /tmp/TacoMaps/. ${INSTDIR}GameData/Classic/Maps/
# SCRIPT - custom (custom content / overrides)
COPY _custom/. ${INSTDIR}
# SCRIPT - expand admin prefs
COPY _scripts/cfg-admin-prefs ${SRVDIR}
RUN chmod +x ${SRVDIR}/cfg-admin-prefs
# PERMISSIONS
RUN chown -R ${SRVUSER}: /home/${SRVUSER}
# PORTS
EXPOSE \
# -- tribes
666/tcp \
28000/udp
USER ${SRVUSER}
WORKDIR ${INSTDIR}
CMD ["./start-server"]