Enabled first start functionality
This commit is contained in:
parent
39be522172
commit
9218b58a71
@ -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 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 -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" ]
|
VOLUME [ "/etc/ssh" ]
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
@ -49,5 +50,3 @@ LABEL cron.daily root:/usr/bin/tdp.mysql.sh -s information_schema:performance_sc
|
|||||||
COPY init /sbin/
|
COPY init /sbin/
|
||||||
ENTRYPOINT [ "/sbin/init" ]
|
ENTRYPOINT [ "/sbin/init" ]
|
||||||
CMD [ "start" ]
|
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"
|
|
||||||
|
9
init
9
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)
|
[ "$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
|
trap 'stop' SIGTERM
|
||||||
|
|
||||||
if [ "$1" == "start" ]; then
|
if [ "$1" == "start" ]; then
|
||||||
@ -64,7 +71,9 @@ if [ "$1" == "start" ]; then
|
|||||||
echo "! NOT starting HTTP"
|
echo "! NOT starting HTTP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
firststart
|
||||||
wait
|
wait
|
||||||
else
|
else
|
||||||
|
firststart
|
||||||
exec $@
|
exec $@
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user