Spotter-VM/mariadb/Dockerfile

20 lines
505 B
Docker
Raw Normal View History

2018-01-19 15:50:15 +01:00
FROM alpine:3.7
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
2018-04-29 21:48:14 +02:00
&& apk --no-cache add mariadb mariadb-client s6 \
# 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"]