2019-01-04 12:32:04 +00:00
|
|
|
FROM mysql:5.6
|
|
|
|
|
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 - \
|
2019-01-04 12:32:04 +00:00
|
|
|
&& echo "deb http://apt.verdnatura.es/ jessie main" > /etc/apt/sources.list.d/vn.list \
|
|
|
|
&& apt-get update \
|
2019-01-04 14:20:02 +00:00
|
|
|
&& apt-get install -y vn-mysql \
|
|
|
|
&& apt-get purge -y --auto-remove curl ca-certificates \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2019-01-04 12:32:04 +00:00
|
|
|
|
2019-01-09 09:02:56 +00:00
|
|
|
# XXX: Removes the last script line to avoid daemon to be started
|
2019-01-08 19:15:47 +00:00
|
|
|
RUN cp /usr/local/bin/docker-entrypoint.sh /usr/local/bin/docker-init.sh \
|
|
|
|
&& sed -i '$ d' /usr/local/bin/docker-init.sh
|
|
|
|
|
2018-02-07 15:45:40 +00:00
|
|
|
WORKDIR /docker-entrypoint-initdb.d
|
2019-01-08 19:15:47 +00:00
|
|
|
ARG STAMP=unknown
|
2019-04-03 08:29:05 +00:00
|
|
|
|
|
|
|
COPY import-changes.sh config.ini /docker-entrypoint-initdb.d/import/
|
2019-07-25 15:35:51 +00:00
|
|
|
COPY docker.cnf /etc/mysql/mysql.conf.d/
|
2019-04-03 08:29:05 +00:00
|
|
|
COPY changes /docker-entrypoint-initdb.d/import/changes
|
|
|
|
|
|
|
|
COPY docker-boot.sh /docker-entrypoint-initdb.d/
|
|
|
|
COPY dump /docker-entrypoint-initdb.d/dump
|
|
|
|
|
2019-01-04 12:32:04 +00:00
|
|
|
RUN mkdir /mysql-data \
|
2019-01-04 14:20:02 +00:00
|
|
|
&& /usr/local/bin/docker-init.sh mysqld --datadir /mysql-data \
|
|
|
|
&& chown -R mysql:mysql /mysql-data \
|
|
|
|
&& rm -rf /docker-entrypoint-initdb.d/*
|
2019-01-04 12:32:04 +00:00
|
|
|
|
2019-01-09 09:02:56 +00:00
|
|
|
COPY docker-start.sh /usr/local/bin/
|
|
|
|
ENTRYPOINT ["docker-start.sh"]
|
|
|
|
|
2019-01-04 14:20:02 +00:00
|
|
|
USER mysql
|
2019-01-04 12:32:04 +00:00
|
|
|
CMD ["mysqld", "--datadir", "/mysql-data"]
|
|
|
|
|
2018-02-13 21:40:02 +00:00
|
|
|
#HEALTHCHECK --interval=5s --timeout=10s --retries=200 \
|
|
|
|
# CMD mysqladmin ping -h 127.0.0.1 -u root || exit 1
|