Added WebWolf to Docker

This commit is contained in:
Nanne Baars 2017-09-12 23:44:32 +02:00
parent 46c536554c
commit 109fe2c438
3 changed files with 16 additions and 4 deletions

View File

@ -36,6 +36,11 @@
<directory>${project.build.directory}</directory> <directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include> <include>${project.build.finalName}.jar</include>
</resource> </resource>
<resource>
<targetPath>/</targetPath>
<directory>${project.basedir}/../webwolf/target</directory>
<include>webwolf-${project.version}.jar</include>
</resource>
</resources> </resources>
</configuration> </configuration>
</plugin> </plugin>

View File

@ -3,9 +3,10 @@ FROM openjdk:8-jre
RUN useradd --home-dir /home/webgoat --create-home -U webgoat RUN useradd --home-dir /home/webgoat --create-home -U webgoat
USER 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 RUN cd /home/webgoat/; mkdir -p .webgoat
COPY webgoat-server-8.0-SNAPSHOT.jar /home/webgoat/webgoat.jar COPY webgoat-server-8.0-SNAPSHOT.jar /home/webgoat/webgoat.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/home/webgoat/webgoat.jar"] COPY webwolf-8.0-SNAPSHOT.jar /home/webgoat/webwolf.jar
COPY startup.sh /home/webgoat/startup.sh
RUN sudo chmod +x /home/webgoat/startup.sh
CMD ["/home/webgoat/startup.sh"]

View File

@ -0,0 +1,6 @@
#!/bin/sh
java -Djava.security.egd=file:/dev/./urandom -jar /home/webgoat/webgoat.jar &
echo "Waiting for WebGoat to start..."
sleep 20
java -Djava.security.egd=file:/dev/./urandom -jar /home/webgoat/webwolf.jar