From 8bc0e96641b868df7baabcf32f0831d36492e2a7 Mon Sep 17 00:00:00 2001 From: phyzical <5182053+phyzical@users.noreply.github.com> Date: Sat, 27 Jul 2024 17:33:39 +0800 Subject: [PATCH] simplify paths --- Dockerfile | 11 +++++------ install_docker.sh | 3 --- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index a9fd98f1..404352d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,17 +29,16 @@ ENV STEAM_ACCOUNT="" RUN echo "steam ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/steam \ && chmod 0440 /etc/sudoers.d/steam -RUN mkdir -p /home/cs2-modded-server +ENV HOME="/home/steam/cs2/" -RUN mkdir -p /home/steam/cs2 +RUN mkdir -p $HOME -ENV HOME="/home/cs2-modded-server/" WORKDIR $HOME -RUN chown -R steam:steam /home/steam/cs2 +RUN chown -R steam:steam $HOME -COPY . /home/cs2-modded-server/ +COPY . $HOME USER steam -CMD [ "sudo", "-E", "bash", "/home/cs2-modded-server/install_docker.sh" ] +CMD [ "sudo", "-E", "bash", "$HOME/install_docker.sh" ] diff --git a/install_docker.sh b/install_docker.sh index aee49b22..e0eda734 100644 --- a/install_docker.sh +++ b/install_docker.sh @@ -137,9 +137,6 @@ ln -sf /steamcmd/linux32/steamclient.so /home/${user}/.steam/sdk32/ mkdir -p /home/${user}/.steam/sdk64/ ln -sf /steamcmd/linux64/steamclient.so /home/${user}/.steam/sdk64/ -echo "Installing mods" -cp -R /home/game/csgo/ /home/${user}/cs2/game/ - echo "Merging in custom files" cp -RT /home/custom_files/ /home/${user}/cs2/game/csgo/