From d89545cf25a3dd56fb5a305c8597c78b78a6d0b7 Mon Sep 17 00:00:00 2001 From: BlueTeamNinja <1891183+BlueTeamNinja@users.noreply.github.com> Date: Sun, 21 Jan 2024 14:10:52 -0700 Subject: [PATCH] Updating to confirm --- Dockerfile | 7 ++----- data/mkdocs.yml | 2 +- scripts/init.sh | 3 --- scripts/launch.sh | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 scripts/init.sh diff --git a/Dockerfile b/Dockerfile index 0a1ae21..db18985 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,9 +26,6 @@ RUN pip install pymdown-extensions \ && pip install pip install mkdocs-dracula-theme USER root -# Copy the init and make it executionerable -COPY ./scripts/init.sh /usr/src/mkdocs/build/init.sh -RUN chmod 0744 /usr/src/mkdocs/build/init.sh COPY ./scripts/update.sh /usr/src/mkdocs/build/update.sh RUN chmod 0744 /usr/src/mkdocs/build/update.sh @@ -52,9 +49,9 @@ COPY ./scripts/launch.sh /usr/src/mkdocs/build/launch.sh # Run the command on container startup RUN chmod 0744 /usr/src/mkdocs/build/launch.sh +RUN git clone $REPO /build/ +RUN chown mkdocs:mkdocs -R /build USER mkdocs -COPY ./data/mkdocs.yml /usr/src/mkdocs/build/.clone/data/mkdocs.yml - ENTRYPOINT ["/usr/src/mkdocs/build/launch.sh"] \ No newline at end of file diff --git a/data/mkdocs.yml b/data/mkdocs.yml index ba5dbae..e5c44f8 100644 --- a/data/mkdocs.yml +++ b/data/mkdocs.yml @@ -1,6 +1,6 @@ site_name: Graylog CTF Handbook site_url: https://handbook.logfather.org -docs_dir: /build/docs +docs_dir: /build/data/docs theme: name: dracula locale: en diff --git a/scripts/init.sh b/scripts/init.sh deleted file mode 100644 index 2ec6a7d..0000000 --- a/scripts/init.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -git clone $REPO /usr/src/mkdocs/build/.clone -ln -s /usr/src/mkdocs/build/.clone/data /build \ No newline at end of file diff --git a/scripts/launch.sh b/scripts/launch.sh index 710627b..02b03c4 100644 --- a/scripts/launch.sh +++ b/scripts/launch.sh @@ -1,2 +1,2 @@ #!/bin/bash -/usr/src/mkdocs/.local/bin/mkdocs serve --dev-addr 0.0.0.0:8000 --config-file /usr/src/mkdocs/build/.clone/data/mkdocs.yml \ No newline at end of file +/usr/src/mkdocs/.local/bin/mkdocs serve --dev-addr 0.0.0.0:8000 --config-file /build/data/mkdocs.yml \ No newline at end of file