forked from redhat-cop/containers-quickstarts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
53 lines (44 loc) · 1.79 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This dockerfile builds the zap stable release
FROM centos:centos7
LABEL maintainer="Deven Phillips <[email protected]>"
RUN yum install -y epel-release && \
yum clean all && \
yum install -y redhat-rpm-config \
make automake autoconf gcc gcc-c++ \
libstdc++ libstdc++-devel \
java-1.8.0-openjdk wget curl \
xmlstarlet git x11vnc gettext tar \
xorg-x11-server-Xvfb openbox xterm \
net-tools python-pip \
firefox nss_wrapper java-1.8.0-openjdk-headless \
java-1.8.0-openjdk-devel nss_wrapper git && \
yum clean all && \
pip install --upgrade pip && \
pip install zapcli && \
pip install python-owasp-zap-v2.4 && \
mkdir -p /zap/wrk && \
mkdir -p /var/lib/jenkins/.vnc
ADD zap /zap/
# Copy the entrypoint
COPY configuration/* /var/lib/jenkins/
COPY configuration/run-jnlp-client /usr/local/bin/run-jnlp-client
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ \
PATH=$JAVA_HOME/bin:/zap:$PATH \
ZAP_PATH=/zap/zap.sh \
HOME=/var/lib/jenkins \
ZAP_PORT=8080
COPY policies /var/lib/jenkins/.ZAP/policies/
COPY .xinitrc /var/lib/jenkins/
WORKDIR /zap
# Download and expand the latest stable release
RUN curl -s https://raw.githubusercontent.com/zaproxy/zap-admin/master/ZapVersions-dev.xml | xmlstarlet sel -t -v //url |grep -i Linux | wget -q --content-disposition -i - -O - | tar zx --strip-components=1 && \
curl -s -L https://bitbucket.org/meszarv/webswing/downloads/webswing-2.3-distribution.zip | jar -x && \
touch AcceptedLicense && \
chown root:root /zap -R && \
chown root:root -R /var/lib/jenkins && \
chmod 777 /var/lib/jenkins -R && \
chmod 777 /zap -R
ADD webswing.config /zap/webswing-2.3/webswing.config
WORKDIR /var/lib/jenkins
# Run the Jenkins JNLP client
ENTRYPOINT ["/usr/local/bin/run-jnlp-client"]