diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile deleted file mode 100644 index 16601de..0000000 --- a/mariadb/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM alpine -LABEL maintainer="Disassembler " - -RUN \ - # 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 - -COPY docker/ / - -VOLUME ["/etc/mysql", "/var/lib/mysql"] -EXPOSE 3306 - -CMD ["s6-svscan", "/etc/services.d"] diff --git a/mariadb/docker/etc/services.d/.s6-svscan/finish b/mariadb/docker/etc/services.d/.s6-svscan/finish deleted file mode 100755 index 78d5fdc..0000000 --- a/mariadb/docker/etc/services.d/.s6-svscan/finish +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -/bin/true diff --git a/mariadb/docker/etc/services.d/mariadb/run b/mariadb/docker/etc/services.d/mariadb/run deleted file mode 100755 index a8d26ef..0000000 --- a/mariadb/docker/etc/services.d/mariadb/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/execlineb -P - -fdmove -c 2 1 -s6-setuidgid 3306:3306 -/usr/bin/mysqld diff --git a/mariadb/lxcfile b/mariadb/lxcfile new file mode 100644 index 0000000..7d8b46b --- /dev/null +++ b/mariadb/lxcfile @@ -0,0 +1,22 @@ +IMAGE mariadb +LAYER shared/alpine +LAYER mariadb/mariadb + +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 /srv/mariadb/conf etc/mysqld +MOUNT /srv/mariadb/data var/lib/mysql + +USER 3306 3306 +CMD /usr/bin/mysqld diff --git a/mariadb/build.sh b/mariadb/setup.sh similarity index 100% rename from mariadb/build.sh rename to mariadb/setup.sh diff --git a/mariadb/adminpwd.sql b/mariadb/setup/adminpwd.sql similarity index 100% rename from mariadb/adminpwd.sql rename to mariadb/setup/adminpwd.sql diff --git a/mariadb/etc/init.d/mariadb b/mariadb/setup/etc/init.d/mariadb similarity index 100% rename from mariadb/etc/init.d/mariadb rename to mariadb/setup/etc/init.d/mariadb diff --git a/mariadb/srv/mariadb/conf/my.cnf b/mariadb/setup/srv/mariadb/conf/my.cnf similarity index 100% rename from mariadb/srv/mariadb/conf/my.cnf rename to mariadb/setup/srv/mariadb/conf/my.cnf