Ported main server image to Debian for ARM64 support

This commit is contained in:
James Plante 2025-03-29 15:15:07 -04:00
parent bb3ef5a926
commit 67ff52c454

View File

@ -1,17 +1,15 @@
#
# Build stage
#
FROM alpine:3.21 AS rr-builder
FROM debian:stable-slim AS rr-builder
ARG RR_VERSION
# Install Essential Utilities
RUN apk update
RUN apk add bash git curl build-base unzip libc++-dev libc-dev lld cmake ninja make
RUN apt-get update
RUN apt-get install -y bash git curl unzip build-essential cmake ninja-build
# 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
RUN apt-get install -y libcurl4-openssl-dev libsdl2-dev zlib1g-dev libpng-dev libogg-dev libvorbis-dev libvpx-dev libyuv-dev
# Clone the repo
RUN mkdir /buildfiles
@ -27,15 +25,14 @@ RUN ./build.sh
#
# Server stage
#
FROM alpine:3.21 AS rr-server
FROM debian:stable-slim AS rr-server
ARG RR_VERSION
# Install runtime dependencies
RUN apk add bash curl sdl2 zlib libpng libogg libvorbis libvpx
RUN apk add --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main libyuv
RUN apt-get update && apt-get install --no-install-recommends -y bash curl libsdl2-2.0-0 zlib1g libpng16-16 libogg0 libvorbis0a libvpx7 libyuv0
# Create a 'ringracers' group and user
RUN addgroup -S ringracers && adduser -S ringracers -G ringracers
RUN useradd ringracers
USER ringracers
# After building, copy build files to new container
@ -51,4 +48,4 @@ RUN chmod +x run_server.sh
# Set up environment variables
ENV RINGRACERSWADDIR=/data/ringracers-data
ENV RR_VERSION=${RR_VERSION}
ENTRYPOINT [ "./run_server.sh" ]
ENTRYPOINT [ "./run_server.sh" ]