20 lines
498 B
Docker
20 lines
498 B
Docker
FROM alpine
|
|
MAINTAINER Disassembler <disassembler@dasm.cz>
|
|
|
|
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/nologin -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"]
|