Reorganizing and updating.
This commit is contained in:
parent
228f9646be
commit
849530158a
7 changed files with 22 additions and 18 deletions
30
Dockerfile
30
Dockerfile
|
|
@ -1,13 +1,17 @@
|
||||||
FROM steamcmd/steamcmd:latest
|
FROM steamcmd/steamcmd:latest
|
||||||
|
|
||||||
ENV PORT=7777
|
ENV PORT=7777
|
||||||
ENV UID=568
|
ENV UID=1000
|
||||||
ENV GID=568
|
ENV GID=1000
|
||||||
ENV HOME_DIR=/home/steam
|
# ENV HOME_DIR=/home/steam
|
||||||
ENV SERVER=$HOME_DIR/server
|
# ENV SERVER=$HOME_DIR/server
|
||||||
ENV CONFIGS=$HOME_DIR/.config/SCP\ Secret\ Laboratory/config/$PORT
|
# ENV CONFIGS=$HOME_DIR/.config/SCP\ Secret\ Laboratory/config/$PORT
|
||||||
|
ENV STEAM_DIR=/usr/lib/games/steam
|
||||||
|
ENV INSTALL_DIR=/home/steam
|
||||||
|
ENV SERVER_DIR=$INSTALL_DIR/server
|
||||||
|
ENV CONFIG_DIR=$INSTALL_DIR/.config
|
||||||
|
|
||||||
RUN mkdir -p $HOME_DIR $SERVER
|
RUN mkdir -p ${INSTALL_DIR} ${SERVER_DIR} ${CONFIG_DIR}
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y libicu-dev
|
apt-get install -y libicu-dev
|
||||||
|
|
@ -16,13 +20,13 @@ RUN apt-get update && \
|
||||||
RUN addgroup --gid $GID steam && \
|
RUN addgroup --gid $GID steam && \
|
||||||
adduser --disabled-password --gecos '' --uid $UID --gid $GID steam
|
adduser --disabled-password --gecos '' --uid $UID --gid $GID steam
|
||||||
|
|
||||||
COPY start.sh /start.sh
|
COPY start.sh $INSTALL_DIR/start.sh
|
||||||
COPY config_gameplay.txt $CONFIGS/config_gameplay.txt
|
# COPY config_gameplay.txt $CONFIGS/config_gameplay.txt
|
||||||
COPY config_remoteadmin.txt $CONFIGS/config_remoteadmin.txt
|
# COPY config_remoteadmin.txt $CONFIGS/config_remoteadmin.txt
|
||||||
COPY config_localadmin_global.txt $CONFIGS/../config_localadmin_global.txt
|
# COPY config_localadmin_global.txt $CONFIGS/../config_localadmin_global.txt
|
||||||
COPY localadmin_internal_data.json $CONFIGS/../localadmin_internal_data.json
|
# COPY localadmin_internal_data.json $CONFIGS/../localadmin_internal_data.json
|
||||||
|
|
||||||
# Change ownership of directories and set the start script as executable
|
# Change ownership of directories and set the start script as executable
|
||||||
RUN chown $UID:$GID -R $HOME_DIR /usr/lib/games/steam/
|
RUN chown $UID:$GID -R ${STEAM_DIR} ${INSTALL_DIR} ${SERVER_DIR} ${CONFIG_DIR}
|
||||||
|
|
||||||
ENTRYPOINT /bin/sh /start.sh
|
ENTRYPOINT /bin/sh ${INSTALL_DIR}/start.sh
|
||||||
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2023 Matthew Green
|
Copyright (c) 2025 Matthew Green
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
||||||
8
start.sh
8
start.sh
|
|
@ -1,10 +1,10 @@
|
||||||
echo "Current user is: $(whoami)"
|
echo "Current user is: $(whoami)"
|
||||||
steamcmd +force_install_dir $SERVER +login anonymous +app_update 996560 validate +quit
|
steamcmd +force_install_dir $SERVER_DIR +login anonymous +app_update 996560 validate +quit
|
||||||
|
|
||||||
chown steam:steam -R $HOME_DIR
|
chown steam:steam -R $INSTALL_DIR
|
||||||
|
|
||||||
su - steam
|
su - steam
|
||||||
echo "Current user is: $(whoami)"
|
echo "Current user is: $(whoami)"
|
||||||
cd $SERVER
|
cd $SERVER_DIR
|
||||||
export HOME=$HOME_DIR
|
export HOME=$SERVER_DIR
|
||||||
./LocalAdmin $PORT --config $CONFIGS
|
./LocalAdmin $PORT --config $CONFIGS
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue