2020-08-07 12:35:20 +00:00
|
|
|
FROM mariadb:10.4.13
|
2019-01-04 12:32:04 +00:00
|
|
|
|
2018-05-08 09:34:50 +00:00
|
|
|
ENV MYSQL_ROOT_PASSWORD root
|
2019-01-04 12:32:04 +00:00
|
|
|
ENV TZ Europe/Madrid
|
|
|
|
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y --no-install-recommends curl ca-certificates \
|
2019-01-08 19:15:47 +00:00
|
|
|
&& curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \
|
2020-08-07 12:35:20 +00:00
|
|
|
&& echo "deb http://apt.verdnatura.es/ jessie main" > /etc/apt/sources.list.d/vn.list \
|
2019-01-04 12:32:04 +00:00
|
|
|
&& apt-get update \
|
2020-08-07 12:35:20 +00:00
|
|
|
&& apt-get install -y vn-mariadb \
|
2019-01-04 14:20:02 +00:00
|
|
|
&& apt-get purge -y --auto-remove curl ca-certificates \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2019-01-04 12:32:04 +00:00
|
|
|
|
2019-12-11 14:01:01 +00:00
|
|
|
COPY docker/docker.cnf /etc/mysql/conf.d/
|
2020-09-28 08:40:50 +00:00
|
|
|
COPY \
|
|
|
|
docker/docker-init.sh \
|
|
|
|
docker/docker-temp-start.sh \
|
|
|
|
docker/docker-temp-stop.sh \
|
|
|
|
docker/docker-dump.sh \
|
|
|
|
docker/docker-start.sh \
|
|
|
|
/usr/local/bin/
|
2019-01-08 19:15:47 +00:00
|
|
|
|
2019-12-11 14:01:01 +00:00
|
|
|
RUN mkdir /mysql-data \
|
|
|
|
&& chown -R mysql:mysql /mysql-data
|
2019-04-03 08:29:05 +00:00
|
|
|
|
2020-09-28 08:40:50 +00:00
|
|
|
WORKDIR /docker-boot
|
|
|
|
|
|
|
|
COPY \
|
|
|
|
import-changes.sh \
|
|
|
|
config.ini \
|
|
|
|
dump/mysqlPlugins.sql \
|
|
|
|
dump/structure.sql \
|
|
|
|
dump/dumpedFixtures.sql \
|
|
|
|
./
|
|
|
|
RUN gosu mysql docker-init.sh \
|
|
|
|
&& docker-dump.sh mysqlPlugins \
|
|
|
|
&& docker-dump.sh structure \
|
|
|
|
&& docker-dump.sh dumpedFixtures \
|
|
|
|
&& gosu mysql docker-temp-stop.sh
|
|
|
|
|
|
|
|
COPY changes ./changes
|
|
|
|
COPY dump/fixtures.sql ./
|
2019-12-11 14:01:01 +00:00
|
|
|
ARG STAMP=unknown
|
2020-09-28 08:40:50 +00:00
|
|
|
RUN gosu mysql docker-temp-start.sh \
|
|
|
|
&& ./import-changes.sh \
|
|
|
|
&& docker-dump.sh fixtures \
|
|
|
|
&& gosu mysql docker-temp-stop.sh
|
|
|
|
|
|
|
|
RUN echo "[INFO] -> Import finished" \
|
2020-08-07 12:35:20 +00:00
|
|
|
&& rm -rf /docker-boot
|
2019-01-04 12:32:04 +00:00
|
|
|
|
2019-12-11 14:01:01 +00:00
|
|
|
USER mysql
|
2019-01-09 09:02:56 +00:00
|
|
|
ENTRYPOINT ["docker-start.sh"]
|
|
|
|
|
2019-12-11 14:01:01 +00:00
|
|
|
CMD ["mysqld"]
|
2019-01-04 12:32:04 +00:00
|
|
|
|
2020-09-28 08:40:50 +00:00
|
|
|
HEALTHCHECK --interval=2s --timeout=10s --retries=200 \
|
|
|
|
CMD mysqladmin ping -h 127.0.0.1 -u root --password=root || exit 1
|