From 48ba6493a26f25546731989ea7fd68077aab77a7 Mon Sep 17 00:00:00 2001 From: Jon Pugh Date: Sun, 4 Sep 2016 13:24:02 -0400 Subject: [PATCH 1/3] Adding httpd-foreground command. --- Dockerfile | 4 ++++ httpd-foreground | 0 2 files changed, 4 insertions(+) create mode 100644 httpd-foreground diff --git a/Dockerfile b/Dockerfile index eba39b6..947890b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,6 +51,10 @@ RUN chmod +x /usr/local/bin/docker-entrypoint.sh COPY run-tests.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/run-tests.sh +# Put an apache foreground script in place +COPY httpd-foreground /usr/local/bin/httpd-foreground +RUN chmod +x /usr/local/bin/httpd-foreground + #COPY docker-entrypoint-tests.sh /usr/local/bin/ #RUN chmod +x /usr/local/bin/docker-entrypoint-tests.sh diff --git a/httpd-foreground b/httpd-foreground new file mode 100644 index 0000000..e69de29 From c1265f56f2f6f3bf4acdb53d8c9aed9ed660da41 Mon Sep 17 00:00:00 2001 From: Jon Pugh Date: Mon, 5 Dec 2016 11:47:51 -0500 Subject: [PATCH 2/3] Adding httpd-foreground bash script. --- httpd-foreground | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/httpd-foreground b/httpd-foreground index e69de29..e0b3ffe 100644 --- a/httpd-foreground +++ b/httpd-foreground @@ -0,0 +1,10 @@ +#!/bin/bash + +# Copied from official httpd container: https://github.com/docker-library/httpd/blob/fa5223d83a5225aa3fd5b23229b785c7764142bf/2.2/httpd-foreground + +set -e + +# Apache gets grumpy about PID files pre-existing +rm -f /usr/local/apache2/logs/httpd.pid + +exec httpd -DFOREGROUND \ No newline at end of file From 9186030016b13c6a11e6ff5d1063246b5705efdb Mon Sep 17 00:00:00 2001 From: Jon Pugh Date: Mon, 5 Dec 2016 12:55:04 -0500 Subject: [PATCH 3/3] Use "apache2", not "httpd". --- httpd-foreground | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/httpd-foreground b/httpd-foreground index e0b3ffe..29aa3eb 100644 --- a/httpd-foreground +++ b/httpd-foreground @@ -4,7 +4,9 @@ set -e +env + # Apache gets grumpy about PID files pre-existing -rm -f /usr/local/apache2/logs/httpd.pid +rm -f /usr/local/apache2/logs/apache2.pid -exec httpd -DFOREGROUND \ No newline at end of file +exec apache2 -DFOREGROUND \ No newline at end of file