Initial commit
This commit is contained in:
commit
5fb7c08135
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
FROM alpine:3
|
||||
|
||||
# Install Essential Utilities
|
||||
RUN apk update
|
||||
RUN apk add bash git curl build-base unzip libc++-dev libc-dev lld cmake ninja make
|
||||
|
||||
# Install dependencies
|
||||
RUN apk add curl-dev sdl2-dev zlib-dev libpng-dev libogg-dev libvorbis-dev libvpx-dev
|
||||
RUN apk add --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main libyuv libyuv-dev
|
||||
|
||||
# Create a 'ringracers' group and user
|
||||
RUN addgroup -S ringracers && adduser -S ringracers -G ringracers
|
||||
RUN mkdir /buildfiles && chown ringracers:ringracers /buildfiles
|
||||
USER ringracers
|
||||
|
||||
# Clone the repo
|
||||
WORKDIR /buildfiles/
|
||||
RUN git clone https://github.com/KartKrewDev/RingRacers.git
|
||||
|
||||
# Build the code
|
||||
WORKDIR /buildfiles/RingRacers
|
||||
COPY --chown=ringracers:ringracers build.sh .
|
||||
RUN chmod +x build.sh
|
||||
RUN ./build.sh
|
||||
|
||||
# After building
|
||||
WORKDIR /home/ringracers
|
||||
|
||||
# Set up environment variables
|
||||
ENV RINGRACERSWADDIR=/data/ringracers-data
|
||||
|
||||
ENTRYPOINT [ "server/ringracers_v2.3", "-dedicated" ]
|
||||
13
build.sh
Normal file
13
build.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#! /bin/bash
|
||||
RR_VERSION=2,3
|
||||
BUILDDIR=/buildfiles/RingRacers
|
||||
OUTDIR=/home/ringracers/server
|
||||
|
||||
cd $BUILDDIR
|
||||
git fetch --tags
|
||||
git switch --detach tags/v2.3
|
||||
cmake --preset ninja-release
|
||||
cmake --build --preset ninja-release
|
||||
|
||||
[[ -d $OUTDIR ]] || mkdir $OUTDIR
|
||||
cp build/ninja-release/bin/ringracers_v2.3 $OUTDIR
|
||||
10
compose.yml
Normal file
10
compose.yml
Normal file
@ -0,0 +1,10 @@
|
||||
version: '3'
|
||||
services:
|
||||
ringracers:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- 5029:5029/udp
|
||||
volumes:
|
||||
- ./data:/data/ringracers-data
|
||||
1
data/_placeholder
Normal file
1
data/_placeholder
Normal file
@ -0,0 +1 @@
|
||||
Put the contents of the asset ZIP file in here
|
||||
Loading…
x
Reference in New Issue
Block a user