Skip to content

Commit 9028619

Browse files
committed
test: Add custom flags support for HTTPD container
1 parent 4c9aa7b commit 9028619

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

test/httpd/Containerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
FROM fedora:41
22

33
ARG HTTPD_SOURCES="https://dlcdn.apache.org/httpd/httpd-2.4.63.tar.gz"
4+
ARG CFLAGS=""
5+
ARG LFLAGS=""
6+
ARG HTTPD_DEFAULT_FLAGS="--enable-proxy --enable-proxy-http --enable-proxy-ajp --enable-proxy-wstunnel --enable-proxy-hcheck --with-port=8000"
7+
ARG HTTPD_EXTRA_FLAGS=""
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
ENV CONF=httpd/mod_proxy_cluster.conf
812
ENV HTTPD=${HTTPD_SOURCES}
13+
ENV CFLAGS="${CFLAGS}"
14+
ENV LDFLAGS="${LDFLAGS}"
15+
ENV HTTPD_FLAGS="${HTTPD_DEFAULT_FLAGS} ${HTTPD_EXTRA_FLAGS}"
916

1017
# make sure you have copy of the local repository at place
1118
# (our function "httpd_create" takes care of that)
@@ -17,12 +24,7 @@ RUN mkdir httpd
1724
RUN tar xvf $(filename $HTTPD) --strip 1 -C httpd
1825
RUN ls
1926
WORKDIR /httpd
20-
RUN ./configure --enable-proxy \
21-
--enable-proxy-http \
22-
--enable-proxy-ajp \
23-
--enable-proxy-wstunnel \
24-
--enable-proxy-hcheck \
25-
--with-port=8000
27+
RUN ./configure ${HTTPD_FLAGS}
2628
RUN make
2729
RUN make install
2830

@@ -37,7 +39,7 @@ RUN for m in advertise mod_proxy_cluster balancers mod_manager; \
3739
./configure --with-apxs=/usr/local/apache2/bin/apxs; \
3840
make clean; \
3941
make || exit 1; \
40-
cp *.so /usr/local/apache2/modules; \
42+
for f in *.so; do ln -s "$PWD/$f" /usr/local/apache2/modules/$f; done; \
4143
cd $OLDPWD; \
4244
done;
4345

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)