FROM mysql:5.6.42 ENV MYSQL_ROOT_PASSWORD root ENV TZ Europe/Madrid ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends curl ca-certificates \ && curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \ && echo "deb http://apt.verdnatura.es/ jessie main" > /etc/apt/sources.list.d/vn.list \ && apt-get update \ && apt-get install -y --allow-unauthenticated vn-mysql \ && apt-get purge -y --auto-remove curl ca-certificates \ && rm -rf /var/lib/apt/lists/* # XXX: Removes the last script line to avoid daemon to be started RUN cp /usr/local/bin/docker-entrypoint.sh /usr/local/bin/docker-init.sh \ && sed -i '$ d' /usr/local/bin/docker-init.sh WORKDIR /docker-entrypoint-initdb.d ARG STAMP=unknown COPY import-changes.sh config.ini /docker-entrypoint-initdb.d/import/ COPY docker.cnf /etc/mysql/mysql.conf.d/ COPY changes /docker-entrypoint-initdb.d/import/changes COPY docker-boot.sh /docker-entrypoint-initdb.d/ COPY dump /docker-entrypoint-initdb.d/dump RUN mkdir /mysql-data \ && /usr/local/bin/docker-init.sh mysqld --datadir /mysql-data \ && chown -R mysql:mysql /mysql-data \ && rm -rf /docker-entrypoint-initdb.d/* COPY docker-start.sh /usr/local/bin/ ENTRYPOINT ["docker-start.sh"] USER mysql CMD ["mysqld", "--datadir", "/mysql-data"] #HEALTHCHECK --interval=5s --timeout=10s --retries=200 \ # CMD mysqladmin ping -h 127.0.0.1 -u root || exit 1