myt/server/Dockerfile.server

26 lines
456 B
Docker
Raw Normal View History

2022-12-21 13:17:50 +00:00
FROM myt/base
USER root
ENV MYSQL_ROOT_PASSWORD root
RUN mkdir /mysql-data \
&& chown -R mysql:mysql /mysql-data
WORKDIR /workspace
COPY docker.cnf /etc/mysql/conf.d/
COPY \
docker-init.sh \
docker-import.sh \
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