diff --git a/Dockerfile b/Dockerfile index b61f42d..74f4921 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,6 +38,7 @@ COPY 10-default.conf /etc/httpd/conf.d/ RUN ln -f /etc/.ln/httpd/conf.d/awstats.conf /etc/httpd/conf.d/awstats.conf && ln -f /etc/.ln/opendkim.conf /etc/opendkim.conf RUN useradd -c "Hosting Admin User" -m lamp -G apache +RUN useradd -rc "Composer" -m composer -s /sbin/nologin && su composer -s /bin/bash -lc "composer global require laravel/installer && composer require --dev --no-update xethron/migrations-generator:dev-l5 && composer require --dev --no-update way/generators:dev-feature/laravel-five-stable && composer config repositories.repo-name git git@github.com:jamisonvalenta/Laravel-4-Generators.git" VOLUME [ "/etc/ssh" ] EXPOSE 80 443 @@ -49,5 +50,3 @@ LABEL cron.daily root:/usr/bin/tdp.mysql.sh -s information_schema:performance_sc COPY init /sbin/ ENTRYPOINT [ "/sbin/init" ] CMD [ "start" ] - -RUN useradd -rc "Composer" -m composer -s /sbin/nologin && su composer -s /bin/bash -lc "composer global require laravel/installer && composer require --dev --no-update xethron/migrations-generator:dev-l5 && composer require --dev --no-update way/generators:dev-feature/laravel-five-stable && composer config repositories.repo-name git git@github.com:jamisonvalenta/Laravel-4-Generators.git" diff --git a/init b/init index 39dc409..f7d3bae 100755 --- a/init +++ b/init @@ -16,6 +16,13 @@ function stop { [ "$NO_HTTP" != "TRUE" ] && rm -f /var/run/httpd/authdigest_shm.$(cat /var/run/httpd/httpd.pid) && kill $(cat /var/run/httpd/httpd.pid) } +function firststart { + if [ -x /usr/local/sbin/firststart.sh ]; then + /usr/local/sbin/firststart.sh + [ $? -eq 0 ] && rm /usr/local/sbin/firststart.sh + fi +} + trap 'stop' SIGTERM if [ "$1" == "start" ]; then @@ -64,7 +71,9 @@ if [ "$1" == "start" ]; then echo "! NOT starting HTTP" fi + firststart wait else + firststart exec $@ fi