-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (18 loc) · 957 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM debian:9
SHELL ["/bin/bash", "-exo", "pipefail", "-c"]
RUN apt-get update ;\
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-{recommends,suggests} -y \
mariadb-server ;\
apt-get clean ;\
rm -vrf /var/lib/apt/lists/* ;\
perl -pi -e 's/\b127\.0\.0\.1\b/0.0.0.0/ if /^bind-address\s*=/' /etc/mysql/mariadb.conf.d/50-server.cnf
RUN install -m 755 -o mysql -g root -d /var/run/mysqld
RUN mysqld -u mysql & \
MYSQLD_PID="$!" ;\
while ! mysql <<<''; do sleep 1; done ;\
mysql <<<"CREATE DATABASE masif_upgrader; GRANT ALL ON masif_upgrader.* TO masif_upgrader_master@'%' IDENTIFIED BY '123456'; GRANT ALL ON masif_upgrader.* TO masif_upgrader_ui@'%' IDENTIFIED BY '123456';" ;\
kill "$MYSQLD_PID" ;\
while test -e "/proc/$MYSQLD_PID"; do sleep 1; done
COPY --from=ochinchina/supervisord:latest /usr/local/bin/supervisord /usr/local/bin/
COPY supervisord.conf /etc/
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"]