!10 compose镜像加速

This commit is contained in:
白书科技
2024-07-05 05:36:41 +00:00
parent 0a5286d026
commit 5fa072592a
24 changed files with 2175 additions and 966 deletions

View File

@@ -1,18 +1,5 @@
FROM mysql:8.1
FROM registry.cn-hangzhou.aliyuncs.com/hzbs/mysql:8.1
# 时区配置
ARG TZ=UTC
ENV TZ ${TIMEZONE}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone && chown -R mysql:root /var/lib/mysql/
# 复制自定义的my.cnf
COPY my.cnf /etc/mysql/conf.d/my.cnf
# my.cnf只读权限
RUN chmod 0444 /etc/mysql/conf.d/my.cnf
# 暴露3306端口
EXPOSE 3306
# 启动mysql
CMD ["mysqld"]
RUN chmod 0444 /etc/mysql/conf.d/my.cnf