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 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
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends curl ca-certificates \
|
||||
&& 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 \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y vn-mysql
|
||||
|
||||
RUN cp /usr/local/bin/docker-entrypoint.sh /usr/local/bin/my-docker-entrypoint.sh \
|
||||
&& sed -i '$ d' /usr/local/bin/my-docker-entrypoint.sh
|
||||
&& apt-get install -y vn-mysql \
|
||||
&& apt-get purge -y --auto-remove curl ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /docker-entrypoint-initdb.d
|
||||
COPY install /docker-entrypoint-initdb.d
|
||||
RUN mkdir /mysql-data \
|
||||
&& chmod 770 /mysql-data
|
||||
|
||||
RUN /usr/local/bin/my-docker-entrypoint.sh mysqld --datadir /mysql-data
|
||||
&& /usr/local/bin/docker-init.sh mysqld --datadir /mysql-data \
|
||||
&& chown -R mysql:mysql /mysql-data \
|
||||
&& rm -rf /docker-entrypoint-initdb.d/*
|
||||
|
||||
USER mysql
|
||||
CMD ["mysqld", "--datadir", "/mysql-data"]
|
||||
|
||||
#HEALTHCHECK --interval=5s --timeout=10s --retries=200 \
|
||||
|
|
Loading…
Reference in New Issue