From 313aa89d017fe342c95e14a1b35cc9b03876e1fe Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Tue, 9 Aug 2016 10:29:15 -0400 Subject: [PATCH] HTTPD process running in foreground --- Dockerfile | 9 +++++++-- httpd-foreground | 8 +++++++- 2 files changed, 14 insertions(+), 3 deletions(-) mode change 100644 => 100755 httpd-foreground diff --git a/Dockerfile b/Dockerfile index 7ea3fd5..56850a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,10 +12,15 @@ LABEL ImageName=$imagename LABEL ImageOS=centos7 LABEL Version=$version -LABEL Build docker build --rm --tag $registry/$maintainer/$imagename:$tagname . +LABEL Build docker build --rm --tag $registry/$maintainer/$imagename . # Install deps. RUN yum -y install \ httpd \ mod_ssl \ - && yum clean all \ No newline at end of file + && yum clean all + +COPY httpd-foreground /usr/local/bin/ + +EXPOSE 80 +CMD ["httpd-foreground"] \ No newline at end of file diff --git a/httpd-foreground b/httpd-foreground old mode 100644 new mode 100755 index aae1853..e1e88a6 --- a/httpd-foreground +++ b/httpd-foreground @@ -1 +1,7 @@ -https://raw.githubusercontent.com/docker-library/httpd/master/2.4/httpd-foreground \ No newline at end of file +#!/bin/sh +set -e + +# Apache gets grumpy about PID files pre-existing +rm -f /etc/httpd/logs/httpd.pid + +exec httpd -DFOREGROUND \ No newline at end of file