forked from modcluster/mod_proxy_cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
60 lines (42 loc) · 1.54 KB
/
Containerfile
File metadata and controls
60 lines (42 loc) · 1.54 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
FROM fedora:42 AS builder
ARG HTTPD_SOURCES="https://dlcdn.apache.org/httpd/httpd-2.4.66.tar.gz"
RUN dnf install gcc apr-devel apr-util-devel openssl-devel pcre-devel redhat-rpm-config autoconf wcstools -y
ENV HTTPD=${HTTPD_SOURCES}
# 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 --enable-proxy \
--enable-proxy-http \
--enable-proxy-ajp \
--enable-proxy-wstunnel \
--enable-proxy-hcheck
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; \
cp *.so /usr/local/apache2/modules; \
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 -y
COPY --from=builder /usr/local/apache2 /usr/local/apache2
COPY --from=builder /test /test
COPY run.sh /tmp
WORKDIR /usr/local/apache2
CMD /tmp/run.sh