Speed of local db docker regeneration improved
This commit is contained in:
parent
5241fac7de
commit
2fbddfb586
|
@ -3,24 +3,27 @@ FROM mysql:5.6
|
||||||
ENV MYSQL_ROOT_PASSWORD root
|
ENV MYSQL_ROOT_PASSWORD root
|
||||||
ENV TZ Europe/Madrid
|
ENV TZ Europe/Madrid
|
||||||
|
|
||||||
|
RUN cp /usr/local/bin/docker-entrypoint.sh /usr/local/bin/docker-init.sh \
|
||||||
|
&& sed -i '$ d' /usr/local/bin/docker-init.sh
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends curl ca-certificates \
|
&& apt-get install -y --no-install-recommends curl ca-certificates \
|
||||||
&& curl -L https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \
|
&& curl -L 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 \
|
&& echo "deb http://apt.verdnatura.es/ jessie main" > /etc/apt/sources.list.d/vn.list \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y vn-mysql
|
&& apt-get install -y vn-mysql \
|
||||||
|
&& apt-get purge -y --auto-remove curl ca-certificates \
|
||||||
RUN cp /usr/local/bin/docker-entrypoint.sh /usr/local/bin/my-docker-entrypoint.sh \
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
&& sed -i '$ d' /usr/local/bin/my-docker-entrypoint.sh
|
|
||||||
|
|
||||||
WORKDIR /docker-entrypoint-initdb.d
|
WORKDIR /docker-entrypoint-initdb.d
|
||||||
COPY install /docker-entrypoint-initdb.d
|
COPY install /docker-entrypoint-initdb.d
|
||||||
RUN mkdir /mysql-data \
|
RUN mkdir /mysql-data \
|
||||||
&& chmod 770 /mysql-data
|
&& /usr/local/bin/docker-init.sh mysqld --datadir /mysql-data \
|
||||||
|
&& chown -R mysql:mysql /mysql-data \
|
||||||
RUN /usr/local/bin/my-docker-entrypoint.sh mysqld --datadir /mysql-data
|
&& rm -rf /docker-entrypoint-initdb.d/*
|
||||||
|
|
||||||
|
USER mysql
|
||||||
CMD ["mysqld", "--datadir", "/mysql-data"]
|
CMD ["mysqld", "--datadir", "/mysql-data"]
|
||||||
|
|
||||||
#HEALTHCHECK --interval=5s --timeout=10s --retries=200 \
|
#HEALTHCHECK --interval=5s --timeout=10s --retries=200 \
|
||||||
|
|
Loading…
Reference in New Issue