Skip to content

Commit

Permalink
Make seperate docker images for ds2/ds3.
Browse files Browse the repository at this point in the history
  • Loading branch information
TLeonardUK committed Jan 7, 2024
1 parent 73ea820 commit 3dc965d
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,19 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
file: ./DarkSouls3.Dockerfile
push: true
no-cache: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ds3os:latest

- name: Build and push server docker
uses: docker/build-push-action@v2
with:
context: .
file: ./DarkSouls2.Dockerfile
push: true
no-cache: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ds2os:latest

make-release:
name: Make Release
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile → DarkSouls2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ RUN steamcmd +login anonymous +quit

FROM ubuntu@sha256:4b1d0c4a2d2aaf63b37111f34eb9fa89fa1bf53dd6e4ca954d47caebca4005c2 AS runtime

RUN echo "335300" > /opt/ds3os/steam_appid.txt

RUN mkdir -p /opt/ds3os/Saved \
&& useradd -r -s /bin/bash -u 1000 ds3os \
&& chown ds3os:ds3os /opt/ds3os/Saved \
&& apt update && apt install -y --reinstall ca-certificates
&& chown ds3os:ds3os /opt/ds3os \
&& chmod 755 /opt/ds3os/Saved
&& chmod 755 /opt/ds3os
&& apt update
&& apt install -y --reinstall ca-certificates

COPY --from=build /build/bin/x64_release/ /opt/ds3os/
COPY --from=steam /root/.local/share/Steam/steamcmd/linux64/steamclient.so /opt/ds3os/steamclient.so
Expand Down
37 changes: 37 additions & 0 deletions DarkSouls3.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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 libuuid1 uuid-dev uuid-runtime

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:8b2511e03bb70483e32572957bcf2da3af19a4ab394d66176ee2228419834042 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 echo "374320" > /opt/ds3os/steam_appid.txt

RUN mkdir -p /opt/ds3os/Saved \
&& useradd -r -s /bin/bash -u 1000 ds3os \
&& chown ds3os:ds3os /opt/ds3os/Saved \
&& chown ds3os:ds3os /opt/ds3os \
&& chmod 755 /opt/ds3os/Saved
&& chmod 755 /opt/ds3os
&& apt update
&& apt install -y --reinstall ca-certificates

COPY --from=build /build/bin/x64_release/ /opt/ds3os/
COPY --from=steam /root/.local/share/Steam/steamcmd/linux64/steamclient.so /opt/ds3os/steamclient.so

ENV LD_LIBRARY_PATH="/opt/ds3os"

USER ds3os
WORKDIR /opt/ds3os
ENTRYPOINT /opt/ds3os/Server
2 changes: 1 addition & 1 deletion Source/Injector/Config/BuildConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ class BuildConfig
#endif

// Writes out all protobufs to a temporary folder
inline static const char* TEMP_LOG_FOLDER = "Z:/ds3os/Temp/ProtobufDump";
inline static const char* TEMP_LOG_FOLDER = "D:\\Temp\\";

};

0 comments on commit 3dc965d

Please sign in to comment.