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
|
|
|
|
|
2020-08-20 08:37:34 +01:00
|
|
|
ARG vs_type=stable
|
2023-08-15 07:14:19 +01:00
|
|
|
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
|
|
|
|
2023-08-15 07:14:19 +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"
|
2023-08-15 07:14:19 +01:00
|
|
|
RUN rm "vs_server_${vs_os}_${vs_version}.tar.gz"
|
2020-07-24 07:53:22 +01:00
|
|
|
|
|
|
|
# ============== runtime stage ==================
|
2023-08-15 07:14:19 +01:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 as runtime
|
|
|
|
WORKDIR /game
|
2020-08-23 14:06:04 +01:00
|
|
|
# Defaults
|
2023-06-28 20:36:03 +01:00
|
|
|
ENV VS_DATA_PATH=/gamedata/vs
|
2023-08-15 07:14:19 +01:00
|
|
|
COPY --from=downloader "./download/" "/game"
|
|
|
|
|
2020-08-18 06:43:46 +01:00
|
|
|
# Expose ports
|
|
|
|
EXPOSE 42420/tcp
|
|
|
|
|
2020-08-20 08:37:34 +01:00
|
|
|
# Execution command
|
2023-09-04 20:16:04 +01:00
|
|
|
CMD dotnet VintagestoryServer.dll --dataPath $VS_DATA_PATH
|