2018-04-30 22:57:50 +02:00
|
|
|
FROM alpine
|
2018-09-03 22:12:08 +02:00
|
|
|
LABEL maintainer="Disassembler <disassembler@dasm.cz>"
|
2018-01-19 15:50:15 +01:00
|
|
|
|
|
|
|
RUN \
|
|
|
|
# Create OS user (which will be picked up later by apk add)
|
|
|
|
addgroup -S -g 3306 mysql \
|
2018-08-14 18:17:48 +02:00
|
|
|
&& adduser -S -u 3306 -h /var/lib/mysql -s /bin/false -g mysql -G mysql mysql \
|
2018-01-19 15:50:15 +01:00
|
|
|
# Install MariaDB
|
2018-04-30 22:57:50 +02:00
|
|
|
&& apk --no-cache add mariadb mariadb-client \
|
2018-04-29 21:48:14 +02:00
|
|
|
# Create socket directory
|
|
|
|
&& mkdir /run/mysqld \
|
|
|
|
&& chown mysql:mysql /run/mysqld
|
|
|
|
|
|
|
|
COPY docker/ /
|
2018-01-19 15:50:15 +01:00
|
|
|
|
|
|
|
VOLUME ["/etc/mysql", "/var/lib/mysql"]
|
|
|
|
EXPOSE 3306
|
|
|
|
|
2018-04-29 21:48:14 +02:00
|
|
|
CMD ["s6-svscan", "/etc/services.d"]
|