Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #3

Merged
merged 7 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
flowstate-scripts.zip
flowstate.zip
server.zip
23 changes: 8 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:latest
FROM ubuntu:jammy
LABEL org.opencontainers.image.authors="[email protected]" version="1.1"

# Add new user
Expand All @@ -10,20 +10,16 @@ RUN useradd -m r5reloaded
RUN dpkg --add-architecture i386 && \
apt update -y && \
apt upgrade -y && \
apt install software-properties-common wget unzip gnupg -y && \
apt install software-properties-common wget p7zip gnupg -y && \
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | apt-key add - && \
apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ jammy main' && \
apt update -y && \
apt install winehq-stable -y
apt install winehq-stable=8.0.2~jammy-1 wine-stable=8.0.2~jammy-1 wine-stable-amd64=8.0.2~jammy-1 wine-stable-i386=8.0.2~jammy-1 -y

# Copy

# Server zip downloaded from announcements
COPY server.zip /home/r5reloaded
# https://github.com/ColombianGuy/r5_flowstate/archive/refs/heads/r5_flowstate.zip renamed to flowstate-scripts.zip
ADD https://github.com/ColombianGuy/r5_flowstate/archive/refs/heads/r5_flowstate.zip /home/r5reloaded/flowstate-scripts.zip
# https://github.com/ColombianGuy/r5_flowstate/releases/latest Flowstate.-.Required.Files.zip renamed to flowstate.zip
ADD https://github.com/ColombianGuy/r5_flowstate/releases/latest/download/FS4.1.-.Required.Files.zip /home/r5reloaded/flowstate.zip
ADD https://s3.r5reloaded.com/dedicated_builds/server_v2.5_r3_46e2424b.7z /home/r5reloaded/server.7z

RUN chown -R r5reloaded:r5reloaded /home/r5reloaded
# Swap to new user
Expand All @@ -34,16 +30,12 @@ USER r5reloaded

RUN mkdir /home/r5reloaded/server
WORKDIR /home/r5reloaded/server
RUN unzip -o ../server.zip
RUN unzip -o ../flowstate-scripts.zip && \
cp -r r5_flowstate-r5_flowstate/* platform/scripts
WORKDIR /home/r5reloaded/server
RUN unzip -o ../flowstate.zip
RUN 7z x ../server.7z

# Delete files

USER root
RUN rm -rf /home/r5reloaded/server.zip /home/r5reloaded/flowstate.zip /home/r5reloaded/flowstate-scripts.zip
RUN rm -rf /home/r5reloaded/server.7z

# Remove apt packages

Expand All @@ -66,6 +58,7 @@ ENV DEBIAN_FRONTEND=noninteractive
ENV WINEARCH=win64
ENV WINEPREFIX=/home/r5reloaded/server/wineprefix
ENV HOME=/home/r5reloaded
ENV PORT=37000

ENTRYPOINT wine r5apex_ds.exe -port 37000 +launchplaylist "${PLAYLIST}" +hostname "${NAME}" ${ARGS}
ENTRYPOINT wine r5apex_ds.exe -port ${PORT} +launchplaylist "${PLAYLIST}" +hostname "${NAME}" ${ARGS}

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ This runs R5Reloaded from a docker container, this makes setting up servers a bi
### Install

1. Clone this directory `git clone https://github.com/Radiicall/r5reloaded-docker.git`
2. Grab a server zip file from the #announcements channel in the <a href="https://discord.gg/r5reloaded">R5Reloaded</a> server
3. Place server[.]zip in the cloned directory
4. Rename the server zip to `server.zip`
2. Grab a server 7z file from the <a href="https://discord.gg/r5reloaded">R5Reloaded Discord Server</a>
3. Place server[.]7z in the cloned directory
4. Rename the server 7z to `server.7z`
5. Run `docker build -t r5reloaded-server -f Dockerfile` while still in the cloned directory

### Configuration

Inside the docker-compose file you'll see the environment variables, these can be changed to configure the server
Inside the `docker-compose.yml` file you'll see the environment variables, these can be changed to configure the server

### Running

Expand Down
Loading