diff --git a/Dockerfile b/Dockerfile index fc37b50..8dc9a74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ USER root WORKDIR /web VOLUME /git VOLUME /web/config -RUN apk update; apk add apache2 +RUN apk update; apk add apache2 apache2-utils RUN mkdir /run/apache2; chown apache /run/apache2 RUN ln -s /dev/stderr /var/log/apache2/error.log RUN ln -s /dev/stdout /var/log/apache2/access.log diff --git a/README.md b/README.md index c1f2a8f..8ba3d33 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ ## Test locally - docker build -t quay.io/perl/static-web:v0.1 . + docker build -t quay.io/perl/static-web:v0.3 . git clone git@git.develooper.com:perl-static-misc.git git - docker run -p 8000:80 -n static-misc \ + docker run -p 8000:80 --name static-misc \ -v `pwd`/git:/git/static -v `pwd`/config:/web/config \ - -ti --rm quay.io/perl/static-web:v0.1 + -ti --rm quay.io/perl/static-web:v0.3 Test with diff --git a/run-httpd b/run-httpd index f00cd30..0170098 100755 --- a/run-httpd +++ b/run-httpd @@ -8,5 +8,13 @@ if [ ! -z "$READY_FILE" ]; then done fi +if [ ! -z "$PRESTART_SCRIPT" ]; then + if [ ! -e "$PRESTART_SCRIPT" ]; then + echo configured prestart script "$PRESTART_SCRIPT" is missing + else + $PRESTART_SCRIPT + fi +fi + exec httpd -DFOREGROUND -e info #exec httpd -DFOREGROUND -e debug