I submitted a pull request on github, but it appears that you prefer
to use a mailing list for such things.

Attached is a patch to correct the behavior in the Docker container.

The problem is that apache generates httpd.pid at startup and it is
never removed.  When the container is stopped, the file remains.  At
startup httpd fails to start because it believes that httpd is already
running.

The patch simply deletes this file before starting httpd.

-M
From 9a91c48dd4f6b55601e5ff23fc72ac1a34f36e90 Mon Sep 17 00:00:00 2001
From: Mark Deneen <mden...@saucontech.com>
Date: Tue, 2 Jan 2018 12:19:36 -0500
Subject: [PATCH] remove httpd.pid before starting httpd

httpd will not start properly if this file exists.  The docker container will exit if httpd exits, making this file useless.
---
 pkg/docker/entry.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkg/docker/entry.sh b/pkg/docker/entry.sh
index 9ca87458..728298f5 100644
--- a/pkg/docker/entry.sh
+++ b/pkg/docker/entry.sh
@@ -14,4 +14,6 @@ export PGADMIN_SETUP_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
 
 j2 /templates/pgadmin4.conf.j2 > /etc/httpd/conf.d/pgadmin4.conf
 
-/usr/sbin/httpd -D FOREGROUND
\ No newline at end of file
+rm /run/httpd/httpd.pid
+
+/usr/sbin/httpd -D FOREGROUND
-- 
2.14.3

Reply via email to