20 lines
395 B
Docker
20 lines
395 B
Docker
# syntax=docker/dockerfile:1
|
|
FROM alpine:latest
|
|
RUN \
|
|
apk add --no-cache \
|
|
mariadb \
|
|
mariadb-client \
|
|
&& \
|
|
mkdir -p /run/mysqld && \
|
|
chown mysql:mysql /run/mysqld
|
|
|
|
COPY my.cnf /etc/mysql/my.cnf
|
|
COPY createDB.sql /root/
|
|
COPY createDB.sh /root/
|
|
|
|
RUN mysql_install_db && \
|
|
chmod +x root/createDB.sh && \
|
|
root/createDB.sh
|
|
|
|
CMD ["mysqld", "--console"]
|