Files
rvrising/Dockerfile
2022-05-23 22:18:44 -05:00

39 lines
1.5 KiB
Docker

FROM clearlinux:latest
# Dependencies
RUN swupd update
RUN swupd bundle-add x11-server libarchive wget wine
# Directories
RUN mkdir -p /root/.wine/drive_c/steamcmd
RUN mkdir -p /root/.wine/drive_c/users/root/AppData/LocalLow/'Stunlock Studios'/VRisingServer/Saves
RUN mkdir -p /root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings
# Steamcmd
RUN wget -qO- https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip | bsdtar -xvf- -C /root/.wine/drive_c/steamcmd/
# Persist Volumes
VOLUME [ "/root/.wine/drive_c/users/root/AppData/LocalLow/Stunlock Studios/VRisingServer/Saves"]
VOLUME [ "/root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings" ]
# Expose Ports
EXPOSE 9876/udp
EXPOSE 9877/udp
# Running as a bash script works, does not work otherwise
COPY ./init.sh /
RUN chmod +x /init.sh
RUN bash /init.sh || :
# Copy user configured settings
COPY ./config/ServerGameSettings.json /root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/
COPY ./config/ServerHostSettings.json /root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/
COPY ./config/adminlist.txt /root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/
COPY ./config/banlist.txt /root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/
# Start the program, check for update, backup configs, etc
COPY ./start.sh /
RUN chmod +x /start.sh
# Entry Point Script
CMD /start.sh