From c0c84245f5bf3398c42e18daf534a8ea25a819f9 Mon Sep 17 00:00:00 2001 From: mpr Date: Sat, 23 Nov 2024 16:07:02 +0100 Subject: [PATCH] Add Dockerfile --- Dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..6feecf6f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu:22.04 +# FROM alpine.. +# bullseye-slim and bookwork-slim give glibc version compatibility errors + +ENV APP_DIR=/app +ENV ASSETS_DIR=/app/assets + +# Create app directory in the container +WORKDIR ${APP_DIR} + +# COPY ./sour . +COPY ./sour /app/ + +# COPY ./sour ./assets/ +# COPY ./assets ${ASSETS_DIR} +COPY ./assets /app/assets/ + +# 1337 (tcp) for https web application and 28785/udp for native sauerbraten +EXPOSE 1337 +EXPOSE 28785/udp + +CMD ["./sour"] + +## To run this: +# docker build -t sourtest:ubuntu22.04 . +# docker run --name sourtest -p 1337:1337 -p 28785:28785/udp sourtest:ubuntu22.04