Added support to build an Docker container to run it on Raspberry Pi (#329)
Added support to build an Docker container to run it on Raspberry Pi #329
This commit is contained in:
committed by
Nanne Baars
parent
2b9185d85f
commit
26ab0dc712
@ -17,6 +17,65 @@
|
||||
<start-class>org.owasp.webgoat.WebGoat</start-class>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>raspberry-pi-3</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>rpi</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>0.4.10</version>
|
||||
<configuration>
|
||||
<imageName>webgoat/webgoat-8.0</imageName>
|
||||
<dockerDirectory>src/main/docker_rpi3</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.war</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>default</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>!rpi</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>0.4.10</version>
|
||||
<configuration>
|
||||
<imageName>webgoat/webgoat-8.0</imageName>
|
||||
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.war</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
@ -34,22 +93,6 @@
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>0.4.10</version>
|
||||
<configuration>
|
||||
<imageName>webgoat/webgoat-8.0</imageName>
|
||||
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.war</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
|
10
webgoat-container/src/main/docker_rpi3/Dockerfile
Normal file
10
webgoat-container/src/main/docker_rpi3/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
# Baseimage specially for raspberry pi usage
|
||||
FROM resin/rpi-raspbian:jessie
|
||||
VOLUME /tmp
|
||||
# Installing openjdk-8-headless like in the standard Webgoat Docker container
|
||||
RUN apt-get update && apt-get install -y \
|
||||
openjdk-8-jre-headless
|
||||
RUN cd /root; mkdir -p .webgoat
|
||||
ADD webgoat-container-8.0-SNAPSHOT.war webgoat.jar
|
||||
RUN sh -c 'touch /webgoat.jar'
|
||||
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/webgoat.jar"]
|
Reference in New Issue
Block a user