docker-vintagestory/Dockerfile
2023-02-07 15:19:09 +01:00

28 lines
675 B
Docker

# ============== download stage ==================
FROM alpine as downloader
WORKDIR /download
ARG vs_type=stable
ARG vs_version=1.17.11
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"
# ============== runtime stage ==================
FROM mono:latest as runtime
COPY --from=downloader "./download/" "/game"
# Defaults
ARG vs_data_path=/gamedata/vs
COPY "./serverconfig.json" "${vs_data_path}/serverconfig.json"
# Expose ports
EXPOSE 42420/tcp
WORKDIR /game
# Execution command
CMD mono VintagestoryServer.exe --dataPath ${VS_DATA_PATH}