26 lines
484 B
Docker
26 lines
484 B
Docker
FROM myt/base
|
|
|
|
USER root
|
|
ENV MYSQL_ROOT_PASSWORD root
|
|
|
|
RUN mkdir /mysql-data \
|
|
&& chown -R mysql:mysql /mysql-data
|
|
|
|
WORKDIR /workspace
|
|
|
|
COPY server/docker.cnf /etc/mysql/conf.d/
|
|
COPY \
|
|
server/docker-init.sh \
|
|
server/docker-import.sh \
|
|
server/docker-start.sh \
|
|
/usr/local/bin/
|
|
|
|
USER mysql
|
|
|
|
ENTRYPOINT ["docker-start.sh"]
|
|
|
|
CMD ["mysqld"]
|
|
|
|
HEALTHCHECK --interval=2s --timeout=10s --retries=200 \
|
|
CMD mysqladmin ping -h 127.0.0.1 -u root --password=root || exit 1
|