From 3272f3125947dca985c19c40d434d6c942779cae Mon Sep 17 00:00:00 2001 From: Bilal Khan Date: Fri, 26 Jan 2024 14:54:38 +0530 Subject: [PATCH 1/2] Update Dockerfile removed deb.debian.org from the source.list was getting 404 error and amended archive.debian.org --- redblueapp/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/redblueapp/Dockerfile b/redblueapp/Dockerfile index 85766c32..edc17dab 100644 --- a/redblueapp/Dockerfile +++ b/redblueapp/Dockerfile @@ -1,5 +1,14 @@ FROM drupal:8.5.0 +# Use sed to remove the specified lines from sources.list as these deb.debian.org returning 404 error +RUN sed -i '/deb http:\/\/deb.debian.org\/debian stretch main/d' /etc/apt/sources.list +RUN sed -i '/deb http:\/\/deb.debian.org\/debian stretch-updates main/d' /etc/apt/sources.list +RUN sed -i '/deb http:\/\/security.debian.org stretch\/updates main/d' /etc/apt/sources.list + +# Use echo to append the repository lines to the sources.list file to fetch the packages from archive +RUN echo "deb http://archive.debian.org/debian/ stretch main" >> /etc/apt/sources.list +RUN echo "deb http://archive.debian.org/debian-security/ stretch/updates main" >> /etc/apt/sources.list + RUN apt-get update RUN apt-get -y install supervisor RUN apt-get -y install iputils-ping From 690e727e10ba830747fdb45375b8036428de2b91 Mon Sep 17 00:00:00 2001 From: Bilal Khan Date: Fri, 26 Jan 2024 14:56:01 +0530 Subject: [PATCH 2/2] Update buildAndRun.sh Added command to generate CHALLENGE_MASTER_SALT via openssl. --- redblueapp/buildAndRun.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/redblueapp/buildAndRun.sh b/redblueapp/buildAndRun.sh index 9aa09fcd..3e216b6a 100755 --- a/redblueapp/buildAndRun.sh +++ b/redblueapp/buildAndRun.sh @@ -1,2 +1,4 @@ docker build -t securecodingdojo/redblueapp . -docker run -p 8888:8888 -p 8080:80 -e MASTER_SALT="$CHALLENGE_MASTER_SALT" securecodingdojo/redblueapp \ No newline at end of file +CHALLENGE_MASTER_SALT=$(openssl rand -hex 16) +echo $CHALLENGE_MASTER_SALT +docker run -p 8888:8888 -p 8080:80 -e MASTER_SALT="$CHALLENGE_MASTER_SALT" securecodingdojo/redblueapp