forked from BCDevOps/owasp-zap-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
59 lines (47 loc) · 1.87 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
54
55
56
57
58
59
# This dockerfile builds the zap stable release
FROM centos:centos7
MAINTAINER Deven Phillips <[email protected]>
RUN yum install -y epel-release && \
yum clean all
RUN 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
RUN pip install --upgrade pip
RUN pip install zapcli
# Install latest dev version of the python API
RUN pip install python-owasp-zap-v2.4
RUN mkdir -p /zap/wrk
ADD zap /zap/
RUN mkdir -p /var/lib/jenkins/.vnc
# 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/
ENV PATH $JAVA_HOME/bin:/zap:$PATH
ENV ZAP_PATH /zap/zap.sh
ENV HOME /var/lib/jenkins
# Default port for use with zapcli
ENV ZAP_PORT 8080
COPY policies /var/lib/jenkins/.ZAP/policies/
COPY .xinitrc /var/lib/jenkins/
COPY scripts /var/lib/jenkins/.ZAP_D/scripts/
WORKDIR /zap
# Download and expand the latest stable release
RUN curl -s https://raw.githubusercontent.com/zaproxy/zap-admin/master/ZapVersions.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.5.10-distribution.zip | jar -x && \
touch AcceptedLicense
ADD webswing.config /zap/webswing/webswing.config
RUN chown root:root /zap -R && \
chown root:root -R /var/lib/jenkins && \
chmod 777 /var/lib/jenkins -R && \
chmod 777 /zap -R
WORKDIR /var/lib/jenkins
# Run the Jenkins JNLP client
ENTRYPOINT ["/usr/local/bin/run-jnlp-client"]