mariadb running ok

This commit is contained in:
hugo gogo
2022-09-06 17:37:52 +02:00
parent 409599d558
commit 96290b796b
4 changed files with 20 additions and 28 deletions

View File

@@ -1,11 +1,15 @@
FROM debian:buster
RUN apt update && apt install -y mariadb-client mariadb-server
ARG DEBIAN_FRONTEND=noninteractive
RUN service mysql start
RUN mariadb --execute="create database db_hugo_test;"
RUN mariadb --execute="create user 'u_hugo_test'@'localhost' identified by 'hello';"
RUN mariadb --execute="grant all privileges on *.* to 'u_hugo_test'@'localhost' with grant option;"
RUN apt update && \
apt install -y mariadb-client mariadb-server && \
rm -rf /var/lib/apt/lists/* && \
\
service mysql start && \
mariadb --execute="create database db_hugo_test;" && \
mariadb --execute="create user 'u_hugo_test'@'localhost' identified by 'hello';" && \
mariadb --execute="grant all privileges on *.* to 'u_hugo_test'@'localhost' with grant option;"
CMD [ "mysqld" ]