Got server running but is stuck on EULA accept input.

This commit is contained in:
Matthew Green 2025-04-08 15:56:06 -05:00
parent 0112785c5b
commit 539e75c11d
3 changed files with 10 additions and 9 deletions

View file

@ -24,12 +24,13 @@ RUN apt-get update && \
# Create steam user and group
RUN groupadd --gid $GID steam && \
useradd --create-home -c 'Steam User' -l --uid $UID --gid $GID --home-dir $INSTALL_DIR steam && \
chown -R steam:steam ${INSTALL_DIR}
chown -R steam:steam ${INSTALL_DIR} ${SERVER_DIR} ${CONFIG_DIR} && \
chmod 777 ${INSTALL_DIR} ${SERVER_DIR} ${CONFIG_DIR}
# Copy and prepare start script
COPY start.sh $INSTALL_DIR/start.sh
RUN chmod +x ${INSTALL_DIR}/start.sh && \
chown steam:steam ${INSTALL_DIR}/start.sh
chown -R steam:steam ${INSTALL_DIR}/start.sh
# Switch to steam user
USER steam

View file

@ -19,11 +19,10 @@ build:
# Run the container
.PHONY: run
run:
run: build
@echo "Running container: $(CONTAINER_NAME)"
docker run -d --name $(CONTAINER_NAME) \
-p $(PORT):$(PORT)/udp \
-v $(PWD)/config:/home/steam/.config/SCP\ Secret\ Laboratory/config/$(PORT) \
--restart unless-stopped \
$(IMAGE_NAME):latest

View file

@ -4,11 +4,12 @@ echo "Current user is: $(whoami)"
# Install/update SCP:SL server
steamcmd +force_install_dir $SERVER_DIR +login anonymous +app_update 996560 validate +quit
# # Define config directory path
# CONFIGS="$INSTALL_DIR/.config/SCP Secret Laboratory/config/$PORT"
# # Ensure config directory exists
# mkdir -p "$CONFIGS"
CONFIGS="$INSTALL_DIR/.config/SCP Secret Laboratory/config/"
mkdir -p "$CONFIGS"
chmod 755 "$CONFIGS"
# Run server directly (no need to su)
cd $SERVER_DIR && HOME=$INSTALL_DIR ./LocalAdmin $PORT #--config "$CONFIGS"
cd $SERVER_DIR && HOME=$INSTALL_DIR ./LocalAdmin $PORT --help #--config "$CONFIGS"
sleep infinity