Added cron labels, fixed SSHD

This commit is contained in:
Deon George 2017-04-19 21:55:33 +10:00
parent 2722951f1e
commit 6538e0f130
2 changed files with 4 additions and 20 deletions

View File

@ -1,24 +1,5 @@
# NAME leenooks/lamps
# VERSION php70
# BUILD docker build -t="leenooks/lamps" .
# START docker run -dp 80:80 [-p 443:443 ] -p 2022:22 \
# -e NO_MAIL=TRUE \
# -e NO_DB=TRUE \
# -v /srv/lamps/sites.d:/etc/httpd/sites.d \
# -v /srv/lamps/sites.html:/var/www/sites \
# -v /srv/lamps/mariadb/server.cnf:/etc/my.cnf.d/server.cnf
# -v /srv/lamps/mariadb/data:/var/lib/mysql
# -v /srv/lamps/user:/home/lamp \
# -v /srv/lamps/mail/opendkim:/etc/opendkim \
# -v /srv/lamps/mail/sendmail.mc:/etc/mail/sendmail.mc \
# -v /srv/lamps/tsm/TSM.PWD:/etc/adsm/TSM.PWD \
# -v /srv/lamps/tsm/dsm.sys:/etc/adsm/TSM.PWD \
# -v /dev/log:/dev/log \
# -v /srv/lamps/dsm.sys:/opt/tivoli/tsm/client/api/bin64/dsm.sys \
# -v /srv/lamps/dsm.opt:/opt/tivoli/tsm/client/api/bin64/dsm.opt \
# --hostname=www.example.com \
# --restart=always --name=lamp leenooks/hosting $@
# CRON: docker exec -it lamp /usr/sbin/awstats.sh
FROM registry.leenooks.net/leenooks/base:7
@ -62,6 +43,9 @@ RUN useradd -c "Hosting Admin User" -m lamp -G apache
VOLUME [ "/etc/ssh" ]
EXPOSE 80 443
LABEL cron.hourly root:/usr/sbin/awstats.sh
LABEL cron.daily root:/usr/bin/tdp.mysql.sh -s information_schema:performance_schema
# Starting
COPY init /sbin/
ENTRYPOINT [ "/sbin/init" ]

2
init
View File

@ -39,7 +39,7 @@ if [ "$1" == "start" ]; then
echo "Starting SSHD..."
getent passwd lamp || useradd -c "Hosting Admin User" -m lamp
[ -x /usr/sbin/sshd-keygen ] && /usr/sbin/sshd-keygen
[ -x /usr/sbin/sshd ] && /usr/sbin/sshd
[ -x /usr/sbin/sshd ] && /usr/sbin/sshd -D &
else
echo "! NOT starting SSH"
fi