docker-vintagestory/Dockerfile

29 lines
726 B
Text
Raw Normal View History

2020-07-24 07:53:22 +01:00
# ============== download stage ==================
2023-09-04 20:16:04 +01:00
FROM debian:latest as downloader
2020-07-24 07:53:22 +01:00
WORKDIR /download
ARG vs_type=stable
ARG vs_os=linux-x64
2024-04-01 19:18:02 +01:00
ARG vs_version=1.19.7
2023-09-04 20:16:04 +01:00
RUN apt update
RUN apt install -y wget
2020-07-24 07:53:22 +01:00
RUN wget "https://cdn.vintagestory.at/gamefiles/${vs_type}/vs_server_${vs_os}_${vs_version}.tar.gz"
2023-09-04 20:16:04 +01:00
RUN tar -xvzf "vs_server_${vs_os}_${vs_version}.tar.gz"
RUN rm "vs_server_${vs_os}_${vs_version}.tar.gz"
2020-07-24 07:53:22 +01:00
# ============== runtime stage ==================
FROM mcr.microsoft.com/dotnet/sdk:7.0 as runtime
WORKDIR /game
# Defaults
2023-06-28 20:36:03 +01:00
ENV VS_DATA_PATH=/gamedata/vs
COPY --from=downloader "./download/" "/game"
# Expose ports
EXPOSE 42420/tcp
# Execution command
2023-09-04 20:16:04 +01:00
CMD dotnet VintagestoryServer.dll --dataPath $VS_DATA_PATH