Dit werkt lokaal
This commit is contained in:
22
Dockerfile
22
Dockerfile
@@ -2,27 +2,29 @@ FROM docker.io/cm2network/steamcmd:latest
|
|||||||
|
|
||||||
ARG APP_USER="gamer"
|
ARG APP_USER="gamer"
|
||||||
ARG APP_UID=568
|
ARG APP_UID=568
|
||||||
ARG APP_DIR="/home/steam/app"
|
ARG APP_DIR="/home/steam/stationeers"
|
||||||
ARG APP_ID=600760
|
ARG APP_ID=600760
|
||||||
ARG USER_DIR="/stationeers"
|
ARG USER_DIR="/stationeers"
|
||||||
|
|
||||||
# Setup local user
|
|
||||||
USER root
|
|
||||||
RUN useradd --uid "$APP_UID" --user-group --create-home --home "$APP_DIR" --shell /sbin/nologin "$APP_USER"
|
|
||||||
|
|
||||||
# Install application and configure access rights
|
# Install application and configure access rights
|
||||||
USER "$APP_USER"
|
RUN /home/steam/steamcmd/steamcmd.sh +help +quit
|
||||||
RUN /home/steam/steamcmd/steamcmd.sh +force_install_dir "$APP_DIR" +login anonymous +app_update 600760 validate +quit
|
RUN /home/steam/steamcmd/steamcmd.sh +force_install_dir "$APP_DIR" +login anonymous +app_update 600760 validate +quit
|
||||||
RUN chown -R "$APP_USER":"$APP_USER" "$APP_DIR"/*
|
|
||||||
|
|
||||||
# Link the saves folder to the user mount
|
|
||||||
RUN ln -sf "$USER_DIR" "$APP_DIR/saves"
|
|
||||||
|
|
||||||
# Game port
|
# Game port
|
||||||
EXPOSE 27016/udp
|
EXPOSE 27016/udp
|
||||||
# Steam update port
|
# Steam update port
|
||||||
EXPOSE 27015/udp
|
EXPOSE 27015/udp
|
||||||
|
|
||||||
|
# Setup local user
|
||||||
|
USER root
|
||||||
|
RUN useradd --uid "$APP_UID" --user-group --home "$APP_DIR" --shell /sbin/nologin "$APP_USER"
|
||||||
|
RUN chown -R "$APP_USER":"$APP_USER" "$APP_DIR"
|
||||||
|
|
||||||
|
# Link the saves folder to the user mount
|
||||||
|
RUN ln -sf "$USER_DIR" "$APP_DIR/saves"
|
||||||
|
|
||||||
|
# Prepare entry point
|
||||||
|
USER "$APP_USER"
|
||||||
WORKDIR "$USER_DIR"
|
WORKDIR "$USER_DIR"
|
||||||
ENV PATH="$APP_DIR:$PATH"
|
ENV PATH="$APP_DIR:$PATH"
|
||||||
ENTRYPOINT ["rocketstation_DedicatedServer.x86_64"]
|
ENTRYPOINT ["rocketstation_DedicatedServer.x86_64"]
|
||||||
|
|||||||
Reference in New Issue
Block a user