From 56f19caed655d36f2cac3822d887d37901273153 Mon Sep 17 00:00:00 2001 From: Nanne Baars Date: Tue, 15 Aug 2017 08:15:44 +0200 Subject: [PATCH] #380 Download mongodb while building the Docker image. If you are behind a proxy (or no connection) during the start of WebGoat you might not be able to download the mongodb binary. --- webgoat-server/src/main/docker/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webgoat-server/src/main/docker/Dockerfile b/webgoat-server/src/main/docker/Dockerfile index debc223cb..fcd589685 100644 --- a/webgoat-server/src/main/docker/Dockerfile +++ b/webgoat-server/src/main/docker/Dockerfile @@ -3,6 +3,9 @@ FROM openjdk:8-jre RUN useradd --home-dir /home/webgoat --create-home -U webgoat USER webgoat + +RUN mkdir -p /home/webgoat/.embedmongo/linux +RUN curl -o /home/webgoat/.embedmongo/linux/mongodb-linux-x86_64-3.2.2.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.2.tgz RUN cd /home/webgoat/; mkdir -p .webgoat COPY webgoat-server-8.0-SNAPSHOT.jar /home/webgoat/webgoat.jar ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/home/webgoat/webgoat.jar"] \ No newline at end of file