Skip to content

Commit d0d2cc9

Browse files
authored
Merge pull request #332 from jajik/polish-containerfile
test: Tweak test containers, reduce size
2 parents 4be2bd0 + cfa6f5b commit d0d2cc9

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

test/httpd/Containerfile

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
FROM fedora:41
1+
FROM fedora:41 AS builder
22

33
ARG HTTPD_SOURCES="https://dlcdn.apache.org/httpd/httpd-2.4.63.tar.gz"
44

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

77
ENV CONF=httpd/mod_proxy_cluster.conf
88
ENV HTTPD=${HTTPD_SOURCES}
99

1010
# make sure you have copy of the local repository at place
1111
# (our function "httpd_create" takes care of that)
12-
ADD mod_proxy_cluster /
13-
ADD run.sh /tmp
12+
COPY mod_proxy_cluster /
13+
14+
ADD ${HTTPD} .
15+
16+
RUN mkdir /httpd && tar xvf $(filename $HTTPD) --strip 1 -C /httpd
1417

15-
RUN wget $HTTPD
16-
RUN mkdir httpd
17-
RUN tar xvf $(filename $HTTPD) --strip 1 -C httpd
18-
RUN ls
1918
WORKDIR /httpd
19+
2020
RUN ./configure --enable-proxy \
2121
--enable-proxy-http \
2222
--enable-proxy-ajp \
@@ -41,6 +41,18 @@ RUN for m in advertise mod_proxy_cluster balancers mod_manager; \
4141
cd $OLDPWD; \
4242
done;
4343

44+
RUN rm -rf /test/httpd/mod_proxy_cluster
45+
46+
FROM fedora:41
47+
48+
RUN dnf install pcre apr-util wcstools -y
49+
50+
COPY --from=builder /usr/local/apache2 /usr/local/apache2
51+
52+
COPY --from=builder /test /test
53+
54+
COPY run.sh /tmp
55+
4456
WORKDIR /usr/local/apache2
4557

4658
CMD /tmp/run.sh

test/httpd/run.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#!/bin/sh
22

3-
pwd
4-
ls -lt
5-
6-
# wget and copy the prepared conf file and include it
3+
# copy the prepared conf file and include it
74
cd /test/
85
if [ -f $CONF ]; then
96
FILECONF=$(filename $CONF)

test/tomcat/Containerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ COPY target/*.jar ./lib/
1414

1515
COPY $TESTSUITE_TOMCAT_CONFIG ./conf/server.xml
1616
COPY $TESTSUITE_TOMCAT_CONTEXT ./conf/context.xml
17-
COPY start.sh ./
18-
RUN chmod +x start.sh
17+
COPY --chmod=755 start.sh ./
1918

2019
ENV cluster_port=6666
2120
ENV cluster_address=127.0.0.1

0 commit comments

Comments
 (0)