summaryrefslogtreecommitdiffstats
path: root/2.4
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-08-16 07:03:18 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-08-16 07:03:18 +0200
commit4dc7f58b110719de3900121a2d09ae45037943ca (patch)
tree3cdb173abf41753269ff38e1e82b920b3e2f114c /2.4
parent33945303367244830fdd8d67d9987ad3721049ca (diff)
downloadapache-4dc7f58b110719de3900121a2d09ae45037943ca.tar.gz
apache-4dc7f58b110719de3900121a2d09ae45037943ca.tar.bz2
apache-4dc7f58b110719de3900121a2d09ae45037943ca.tar.xz
apache-4dc7f58b110719de3900121a2d09ae45037943ca.zip
Don't crash if no modules configured
Diffstat (limited to '2.4')
-rw-r--r--2.4/Dockerfile12
1 files changed, 9 insertions, 3 deletions
diff --git a/2.4/Dockerfile b/2.4/Dockerfile
index 87a63d4..874b2d1 100644
--- a/2.4/Dockerfile
+++ b/2.4/Dockerfile
@@ -48,19 +48,25 @@ RUN set -ex; \
# Include enabled configs and sites.
printf '%s\n' "PidFile /tmp/httpd.pid" \
>> "conf/httpd.conf"; \
- printf '%s\n' "Include conf/conf-enabled/*.conf" \
- >> "conf/httpd.conf"; \
printf '%s\n' "Include conf/sites-enabled/*.conf" \
>> "conf/httpd.conf"; \
+ printf '%s\n' "Include conf/conf-enabled/*.conf" \
+ >> "conf/httpd.conf"; \
# Enable module configuration and default site.
+ \
+ have_conf=0; \
mkdir -p "conf/conf-enabled"; \
mkdir -p "conf/sites-enabled"; \
for i in $modules; do \
if [ -f ../conf-available/${i}.conf ]; then \
+ have_conf=1; \
ln -s ../conf-available/${i}.conf "conf/conf-enabled"; \
fi; \
done; \
- ln -s ../sites-available/default.conf "conf/sites-enabled"
+ ln -s ../sites-available/default.conf "conf/sites-enabled"; \
+ if [ $have_conf -eq 0 ]; then \
+ touch conf/conf-enabled/dummy.conf ;\
+ endif
EXPOSE 8080/tcp 8043/tcp
ENTRYPOINT [ "docker-entrypoint.sh" ]