Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

Ensure Docker image can be built #1432

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions util/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM owasp/modsecurity:v2-ubuntu-apache
FROM owasp/modsecurity:2.9-apache-ubuntu
MAINTAINER Chaim Sanders chaim.sanders@gmail.com

ARG COMMIT=v3.1/dev
Expand All @@ -11,17 +11,18 @@ RUN apt-get update && \
RUN cd /opt && \
git clone https://github.com/${REPO}.git owasp-modsecurity-crs-3.1 && \
cd owasp-modsecurity-crs-3.1 && \
git checkout -qf ${COMMIT}
git checkout -qf ${COMMIT}

RUN cd /opt && \
mkdir -pv /etc/apache2/modsecurity.d && \
cp -R /opt/owasp-modsecurity-crs-3.1/ /etc/apache2/modsecurity.d/owasp-crs/ && \
mv /etc/apache2/modsecurity.d/owasp-crs/crs-setup.conf.example /etc/apache2/modsecurity.d/owasp-crs/crs-setup.conf && \
cd /etc/apache2/modsecurity.d && \
printf "include modsecurity.d/owasp-crs/crs-setup.conf\ninclude modsecurity.d/owasp-crs/rules/*.conf" > include.conf && \
sed -i -e 's/SecRuleEngine DetectionOnly/SecRuleEngine On/g' /etc/apache2/modsecurity.d/modsecurity.conf && \
sed -i -e 's/SecRuleEngine DetectionOnly/SecRuleEngine On/g' /etc/modsecurity.d/modsecurity.conf && \
a2enmod proxy proxy_http

COPY proxy.conf /etc/apache2/modsecurity.d/proxy.conf
COPY proxy.conf /etc/modsecurity.d/proxy.conf
COPY docker-entrypoint.sh /

EXPOSE 80
Expand Down