From b8f1afa2eeb993befbbc29aae13737a42e503e0f Mon Sep 17 00:00:00 2001
From: Roger Feese <rfeese@nebraska.edu>
Date: Tue, 6 Dec 2022 16:50:34 -0600
Subject: [PATCH] Add initial Dockerfile

---
 zaproxy/Dockerfile | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100755 zaproxy/Dockerfile

diff --git a/zaproxy/Dockerfile b/zaproxy/Dockerfile
new file mode 100755
index 0000000..dfd8afe
--- /dev/null
+++ b/zaproxy/Dockerfile
@@ -0,0 +1,40 @@
+FROM debian:bullseye-slim
+
+ARG BUILD_DATE
+ARG VCS_REF
+ARG VERSION
+LABEL org.label-schema.build-date=$BUILD_DATE \
+      org.label-schema.name="Owasp Zap Proxy" \
+      org.label-schema.description="Docker image to run ZAP proxy web application scans." \
+      org.label-schema.vcs-ref=$VCS_REF \
+      org.label-schema.vendor="University of Nebraska - Lincoln" \
+      org.label-schema.version="0.1.0" \
+      org.label-schema.schema-version="1.0" \
+      maintainer="Roger Feese <rfeese@nebraska.edu>"
+
+# Based on https://github.com/zaproxy/zaproxy/blob/main/docker/Dockerfile-stable
+# But try to make slimmer. Use Debian as we also are using that for docker build server.
+
+RUN apt-get update && apt-get install -y \
+	wget \
+	curl \
+	openjdk-11-jdk \
+	xmlstarlet \
+	unzip \
+	python3-pip \
+	python-is-python3 \
+	firefox-esr \
+	&& rm -rf /var/lib/apt/lists/*
+   
+WORKDIR /zap
+ 
+RUN wget -qO- https://raw.githubusercontent.com/zaproxy/zap-admin/master/ZapVersions.xml | xmlstarlet sel -t -v //url |grep -i Linux | wget --content-disposition -i - -O - | tar zxv && \
+	mv ZAP*/* . && \
+	rm -R ZAP*
+
+# Update add-ons
+RUN ./zap.sh -cmd -silent -addonupdate
+# Copy them to installation directory
+RUN cp /root/.ZAP/plugin/*.zap plugin/ || :
+
+RUN pip3 install --upgrade awscli pip python-owasp-zap-v2.4 pyyaml urllib3
-- 
GitLab