-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.cache
51 lines (43 loc) · 1.76 KB
/
Dockerfile.cache
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
# syntax=docker/dockerfile:1
# Base image file, separate because SteamCMD, TF2, etc. do not update very often.
FROM steamcmd/steamcmd:latest
# Copy everything in.
WORKDIR /root/.steam/ofsv
ADD ./scripts/* ./
# Some dependencies to download.
RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y \
lib32gcc-s1 libstdc++6 libstdc++6:i386 libncurses5:i386 libtinfo5:i386 \
libcurl4-gnutls-dev:i386 curl
# Install Beans. This downloads Open Fortress for us.
RUN curl -L https://beans.adastral.net/beans -o beans && chmod +x ./beans
# Install TF2 and SDK
RUN steamcmd +runscript /root/.steam/ofsv/tf2sdk-update.txt
# Symlink binaries
RUN cd ./sdk/bin/ && \
ln -s datacache_srv.so datacache.so && \
ln -s dedicated_srv.so dedicated.so && \
ln -s engine_srv.so engine.so && \
ln -s materialsystem_srv.so materialsystem.so && \
ln -s replay_srv.so replay.so && \
ln -s scenefilecache_srv.so scenefilecache.so && \
ln -s shaderapiempty_srv.so shaderapiempty.so && \
ln -s soundemittersystem_srv.so soundemittersystem.so && \
ln -s studiorender_srv.so studiorender.so && \
ln -s vphysics_srv.so vphysics.so
# Download Open Fortress.
RUN ./of-update.sh
# Symlink binary
RUN cd ./sdk/open_fortress/bin/ && \
ln -s server.so server_srv.so
# Insert server config and start script defined in scripts.
RUN mv -f ./server.cfg ./sdk/open_fortress/cfg/
RUN mv -f ./autoexec.cfg ./sdk/open_fortress/cfg/
# Lastly, set the entrypoint to be the run.sh script
ENTRYPOINT [ "/root/.steam/ofsv/run.sh" ]
CMD [ "-exec", "autoexec" ]
# Expose the SRCDS port. Purely for the -P cli argument.
# People who run the container will still need to route the port themselves.
EXPOSE 27005/tcp
EXPOSE 27005/udp
EXPOSE 27015/tcp
EXPOSE 27015/udp