Kubernetes/Docker/Dockerfile/Mysql/Dockerfile-secrets
offends 7a2f41e7d6
All checks were successful
continuous-integration/drone Build is passing
synchronization
2024-08-07 18:54:39 +08:00

14 lines
374 B
Plaintext

FROM mysql:5.7
# FROM mysql:8
ENV MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql-root-pass \
MYSQL_USER=demo \
MYSQL_DATABASE=demo \
MYSQL_PASSWORD_FILE=/run/secrets/mysql-demo-pass
COPY ./sql/* /docker-entrypoint-initdb.d/
# 更改配置文件
#COPY ./my.cnf /etc/my.cnf
CMD ["mysqld", "--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci"]