aboutsummaryrefslogtreecommitdiff
path: root/mariadb/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'mariadb/Dockerfile')
-rw-r--r--mariadb/Dockerfile33
1 files changed, 0 insertions, 33 deletions
diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile
deleted file mode 100644
index 73b1d05..0000000
--- a/mariadb/Dockerfile
+++ /dev/null
@@ -1,33 +0,0 @@
1# vim:set ft=dockerfile:
2FROM alpine:latest
3
4RUN \
5 addgroup -S mysql \
6 && adduser -S -h /var/lib/mysql -H -D -G mysql mysql \
7 && mkdir /docker-entrypoint-initdb.d \
8 && apk --no-cache add \
9 bash \
10 mariadb \
11 mariadb-client \
12 pwgen \
13 socat \
14 su-exec \
15 tzdata \
16 # comment out any "user" entires in the MySQL config
17 # ("docker-entrypoint.sh" or "--user" will handle user switching)
18 && sed -ri 's/^user\s/#&/' /etc/mysql/my.cnf \
19 # increase innodb buffer pool size
20 && sed -i 's/^#innodb_buffer_pool_size = 16M/innodb_buffer_pool_size = 30M/' /etc/mysql/my.cnf \
21 # purge and re-create /var/lib/mysql with appropriate ownership
22 && rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql /run/mysqld \
23 && chown -R mysql:mysql /var/lib/mysql /run/mysqld \
24 # ensure that /run/mysqld (used for socket and lock files) is writable
25 # regardless of the UID our mysqld instance ends up having at runtime
26 && chmod 777 /run/mysqld \
27 # don't reverse lookup hostnames, they are usually another container
28 && sed -i 's/\[mysqld\]/[mysqld]\nskip-host-cache/' /etc/mysql/my.cnf
29
30COPY docker-entrypoint.sh /usr/local/bin/
31ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
32CMD ["mysqld"]
33