fix sudoers
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Paolo Asperti 2019-11-24 10:50:11 +01:00
parent fb3f4fcd56
commit c3f9447a70
Signed by: paspo
GPG Key ID: 06D46905D19D5182
3 changed files with 6 additions and 2 deletions

View File

@ -1,10 +1,12 @@
FROM mariadb:10
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y cron automysqlbackup
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y cron sudo automysqlbackup
RUN touch /etc/mysql/mariadb.conf.d/settings.cnf && chown mysql /etc/mysql/mariadb.conf.d/settings.cnf
COPY docker-entrypoint.sh /usr/local/bin/
COPY automysqlbackup /etc/default
COPY sudoers /etc/sudoers.d/mysudoers
#HEALTHCHECK

View File

@ -341,6 +341,6 @@ EOF
if [ "$READONLY" = "1" ] ; then
echo "read-only" >> /etc/mysql/mariadb.conf.d/settings.cnf
fi
service cron start
sudo service cron start
_main "$@"
fi

2
sudoers Normal file
View File

@ -0,0 +1,2 @@
mysql ALL = (ALL) NOPASSWD: /usr/sbin/service cron start