myt/server/Dockerfile.server

26 lines
484 B
Docker
Raw Permalink 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 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