forked from TLeonardUK/ds3os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (21 loc) · 1.11 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
FROM ubuntu@sha256:4b1d0c4a2d2aaf63b37111f34eb9fa89fa1bf53dd6e4ca954d47caebca4005c2 AS build
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y g++ curl zip unzip tar binutils cmake git yasm
COPY ./ /build
WORKDIR /build/Tools
RUN ./generate_make_release.sh
WORKDIR /build
RUN cd intermediate/make && make -j$(nproc || echo 4)
# Pull an old version because steamcmd has all kinds of fucked up its folder structure in latest.
FROM steamcmd/steamcmd:latest@sha256:5373ccd9282a02e262ba95f3f45d2bea71fbc6ce198b58f86fff680a3e00dd90 AS steam
# Make steamcmd download steam client libraries so we can copy them later.
RUN steamcmd +login anonymous +quit
FROM ubuntu@sha256:4b1d0c4a2d2aaf63b37111f34eb9fa89fa1bf53dd6e4ca954d47caebca4005c2 AS runtime
RUN mkdir -p /opt/ds3os/Saved \
&& useradd -r -s /bin/bash -u 1000 ds3os \
&& chown ds3os:ds3os /opt/ds3os/Saved
COPY --from=build /build/bin/x64_release/ /opt/ds3os/
COPY --from=steam /root/.steam/steamcmd/linux64/steamclient.so /opt/ds3os/steamclient.so
ENV LD_LIBRARY_PATH="/opt/ds3os"
USER ds3os
WORKDIR /opt/ds3os
ENTRYPOINT /opt/ds3os/Server