Spotter-VM/lxc-services/mariadb/lxcfile

25 lines
569 B
Plaintext

IMAGE mariadb_10.3.15-190620
LAYER alpine3.9_3.9.4-190620
RUN EOF
# Create OS user (which will be picked up later by apk add)
addgroup -S -g 3306 mysql
adduser -S -u 3306 -h /var/lib/mysql -s /bin/false -g mysql -G mysql mysql
# Install MariaDB
apk --no-cache add mariadb mariadb-client
# Create socket directory
mkdir /run/mysqld
chown mysql:mysql /run/mysqld
EOF
MOUNT FILE /srv/mariadb/conf/my.cnf etc/my.cnf
MOUNT DIR /srv/mariadb/data var/lib/mysql
USER 3306 3306
CMD mysqld
READY test -e /run/mysqld/mysqld.sock
HALT SIGTERM