Skip to content

Commit 6dbb1ef

Browse files
Copilotfzipi
andauthored
fix: use git clone --recursive for ModSecurity v2 to handle libinjection submodule
Agent-Logs-Url: https://github.com/coreruleset/modsecurity-crs-docker/sessions/0b78dbc1-9b74-4d63-9f80-182f69b184d9 Co-authored-by: fzipi <3012076+fzipi@users.noreply.github.com>
1 parent c06431e commit 6dbb1ef

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

apache/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ RUN set -eux; \
2727
libyajl-dev \
2828
lua${LUA_VERSION}-dev \
2929
make \
30-
pkgconf \
31-
wget
30+
pkgconf
3231

3332
RUN set -eux; \
34-
wget --quiet https://github.com/owasp-modsecurity/ModSecurity/archive/refs/tags/v${MODSEC2_VERSION}.tar.gz; \
35-
tar -zxvf v${MODSEC2_VERSION}.tar.gz; \
33+
git clone https://github.com/owasp-modsecurity/ModSecurity --branch "v${MODSEC2_VERSION}" --depth 1 --recursive ModSecurity-${MODSEC2_VERSION}; \
3634
cd ModSecurity-${MODSEC2_VERSION}; \
3735
./autogen.sh; \
3836
./configure ${MODSEC2_FLAGS}; \

apache/Dockerfile-alpine

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ RUN set -eux; \
2323
geoip-dev \
2424
gcc \
2525
g++ \
26+
git \
2627
gnupg \
2728
libc-dev \
2829
libfuzzy2-dev \
@@ -41,8 +42,7 @@ RUN set -eux; \
4142
zlib-dev
4243

4344
RUN set -eux; \
44-
wget --quiet https://github.com/owasp-modsecurity/ModSecurity/archive/refs/tags/v${MODSEC2_VERSION}.tar.gz; \
45-
tar -zxvf v${MODSEC2_VERSION}.tar.gz; \
45+
git clone https://github.com/owasp-modsecurity/ModSecurity --branch "v${MODSEC2_VERSION}" --depth 1 --recursive ModSecurity-${MODSEC2_VERSION}; \
4646
cd ModSecurity-${MODSEC2_VERSION}; \
4747
./autogen.sh; \
4848
./configure ${MODSEC2_FLAGS}; \

0 commit comments

Comments
 (0)