-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathContainerfile
More file actions
65 lines (47 loc) · 1.84 KB
/
Containerfile
File metadata and controls
65 lines (47 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM fedora:42 AS builder
ARG HTTPD_SOURCES="https://dlcdn.apache.org/httpd/httpd-2.4.66.tar.gz"
ARG CFLAGS=""
ARG LDFLAGS=""
ARG HTTPD_DEFAULT_FLAGS="--enable-proxy --enable-proxy-http --enable-proxy-ajp --enable-proxy-wstunnel --enable-proxy-hcheck --with-port=8000"
ARG HTTPD_EXTRA_FLAGS=""
RUN yum install gcc wget apr-devel apr-util-devel openssl-devel pcre-devel redhat-rpm-config wcstools git autoconf gcovr lcov -y
ENV HTTPD=${HTTPD_SOURCES}
ENV CFLAGS="${CFLAGS}"
ENV LDFLAGS="${LDFLAGS}"
ENV HTTPD_FLAGS="${HTTPD_DEFAULT_FLAGS} ${HTTPD_EXTRA_FLAGS}"
ENV CXXFLAGS="-fprofile-arcs -ftest-coverage"
# make sure you have copy of the local repository at place
# (our function "httpd_create" takes care of that)
COPY mod_proxy_cluster /
ADD ${HTTPD} .
RUN mkdir /httpd && tar xvf $(filename $HTTPD) --strip 1 -C /httpd
WORKDIR /httpd
RUN ./configure ${HTTPD_FLAGS}
RUN make
RUN make install
# we don't need any other listeners except the ones we define in our config files
RUN sed -i 's/\(Listen 80\)/#\1/' /usr/local/apache2/conf/httpd.conf
# httpd is installed in /usr/local/apache2/bin/
# build and install mod_proxy_cluster *.so files.
WORKDIR /native
RUN for m in advertise mod_proxy_cluster balancers mod_manager; \
do \
cd $m; \
echo "Building $m"; \
./buildconf; \
./configure --with-apxs=/usr/local/apache2/bin/apxs; \
make clean; \
make || exit 1; \
for f in *.so; do ln -s "$PWD/$f" /usr/local/apache2/modules/$f; done; \
cd $OLDPWD; \
done;
RUN rm -rf /test/httpd/mod_proxy_cluster
FROM fedora:42
ENV CONF=httpd/mod_proxy_cluster.conf
RUN dnf install pcre apr-util wcstools gcovr lcov -y
COPY --from=builder /usr/local/apache2 /usr/local/apache2
COPY --from=builder /native /native
COPY --from=builder /test /test
COPY run.sh /tmp
WORKDIR /usr/local/apache2
CMD /tmp/run.sh