2020-07-24 07:53:22 +01:00
|
|
|
# ============== download stage ==================
|
|
|
|
FROM alpine as downloader
|
|
|
|
|
|
|
|
WORKDIR /download
|
|
|
|
|
2020-08-20 08:37:34 +01:00
|
|
|
ARG vs_type=stable
|
2022-02-02 19:11:22 +00:00
|
|
|
ARG vs_version=1.16.3
|
2020-07-24 07:53:22 +01:00
|
|
|
|
2020-08-20 08:37:34 +01:00
|
|
|
RUN wget "https://cdn.vintagestory.at/gamefiles/${vs_type}/vs_server_${vs_version}.tar.gz"
|
|
|
|
RUN tar xzf "vs_server_${vs_version}.tar.gz"
|
|
|
|
RUN rm "vs_server_${vs_version}.tar.gz"
|
2020-07-24 07:53:22 +01:00
|
|
|
|
|
|
|
# ============== runtime stage ==================
|
|
|
|
FROM mono:latest as runtime
|
|
|
|
|
2020-08-23 14:06:04 +01:00
|
|
|
COPY --from=downloader "./download/" "/game"
|
2020-07-24 07:53:22 +01:00
|
|
|
|
2020-08-23 14:06:04 +01:00
|
|
|
# Defaults
|
2020-08-20 08:37:34 +01:00
|
|
|
ARG vs_data_path=/gamedata/vs
|
2020-07-24 07:53:22 +01:00
|
|
|
|
2020-08-20 08:37:34 +01:00
|
|
|
COPY "./serverconfig.json" "${vs_data_path}/serverconfig.json"
|
2020-07-24 07:53:22 +01:00
|
|
|
|
2020-08-18 06:43:46 +01:00
|
|
|
# Expose ports
|
|
|
|
EXPOSE 42420/tcp
|
|
|
|
|
2020-08-23 14:06:04 +01:00
|
|
|
WORKDIR /game
|
2020-08-20 08:37:34 +01:00
|
|
|
# Execution command
|
2020-08-23 14:06:04 +01:00
|
|
|
CMD mono VintagestoryServer.exe --dataPath ${VS_DATA_PATH}
|