Skip to content

Commit 831617d

Browse files
committed
test: Add custom flags support for HTTPD container
1 parent 9924833 commit 831617d

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

test/httpd/Dockerfile

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
ARG HTTPD_SOURCES="https://dlcdn.apache.org/httpd/httpd-2.4.62.tar.gz"
2+
ARG CFLAGS=""
3+
ARG LFLAGS=""
4+
ARG HTTPD_DEFAULT_FLAGS="--enable-proxy --enable-proxy-http --enable-proxy-ajp --enable-proxy-wstunnel --enable-proxy-hcheck --with-port=8000"
5+
ARG HTTPD_EXTRA_FLAGS=""
26

37
FROM fedora:40
48

5-
RUN yum install gcc wget apr-devel apr-util-devel openssl-devel pcre-devel redhat-rpm-config wcstools git autoconf -y
9+
RUN yum install gcc wget apr-devel apr-util-devel openssl-devel pcre-devel redhat-rpm-config wcstools git autoconf gcovr -y
610

711
ARG HTTPD_SOURCES
12+
ARG CFLAGS
13+
ARG LFLAGS
14+
ARG HTTPD_DEFAULT_FLAGS
15+
ARG HTTPD_EXTRA_FLAGS
816

917
ENV CONF=httpd/mod_proxy_cluster.conf
1018
ENV HTTPD=${HTTPD_SOURCES}
19+
ENV CFLAGS="${CFLAGS}"
20+
ENV LDFLAGS="${LDFLAGS}"
21+
ENV HTTPD_FLAGS="${HTTPD_DEFAULT_FLAGS} ${HTTPD_EXTRA_FLAGS}"
1122

1223
# make sure you have copy of the local repository at place
1324
# (our function "httpd_create" takes care of that)
@@ -19,12 +30,7 @@ RUN mkdir httpd
1930
RUN tar xvf $(filename $HTTPD) --strip 1 -C httpd
2031
RUN ls
2132
WORKDIR /httpd
22-
RUN ./configure --enable-proxy \
23-
--enable-proxy-http \
24-
--enable-proxy-ajp \
25-
--enable-proxy-wstunnel \
26-
--enable-proxy-hcheck \
27-
--with-port=8000
33+
RUN ./configure ${HTTPD_FLAGS}
2834
RUN make
2935
RUN make install
3036

@@ -39,7 +45,7 @@ RUN for m in advertise mod_proxy_cluster balancers mod_manager; \
3945
./configure --with-apxs=/usr/local/apache2/bin/apxs; \
4046
make clean; \
4147
make || exit 1; \
42-
cp *.so /usr/local/apache2/modules; \
48+
for f in *.so; do ln -s "$PWD/$f" /usr/local/apache2/modules/$f; done; \
4349
cd $OLDPWD; \
4450
done;
4551

test/httpd/run.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/bin/sh
22

3-
pwd
4-
ls -lt
5-
63
# wget and copy the prepared conf file and include it
74
cd /test/
85
if [ -f $CONF ]; then

0 commit comments

Comments
 (0)