fix ARG as cmd param deos not work, using ENV again

This commit is contained in:
Maik Laschober 2020-08-23 15:06:04 +02:00
parent aaa605df31
commit c9c9622524
3 changed files with 9 additions and 8 deletions

View file

@ -13,16 +13,16 @@ RUN rm "vs_server_${vs_version}.tar.gz"
# ============== runtime stage ==================
FROM mono:latest as runtime
WORKDIR /game
COPY --from=downloader "./download/" "/game"
# Defaults
ARG vs_data_path=/gamedata/vs
COPY --from=downloader "./download/" "/game"
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}
CMD mono VintagestoryServer.exe --dataPath ${VS_DATA_PATH}

View file

@ -1,7 +1,7 @@
# ============== runtime stage ==================
FROM devidian/vintagestory:latest as runtime
ARG vs_data_path=/gamedata/vs
ARG vs_data_path=/gamedata/vs-custom
# update with your own serverconfig
COPY serverconfig.json ${vs_data_path}/serverconfig.json
@ -12,4 +12,4 @@ COPY Playerdata ${vs_data_path}/Playerdata/
WORKDIR /game
CMD mono VintagestoryServer.exe --dataPath ${vs_data_path}
CMD mono VintagestoryServer.exe --dataPath ${VS_DATA_PATH}

View file

@ -5,13 +5,14 @@ services:
build:
context: .
args:
vs_data_path: /gamedata/vs-mods/
vs_data_path: /gamedata/vs-custom/
container_name: vsserver
restart: always
volumes:
- gamedata:/gamedata
ports:
- 42420:42420
environment:
VS_DATA_PATH: /gamedata/vs-custom
volumes:
gamedata: