このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン 両方とも次のリビジョン | ||
ソフトウェア:docker:docker-compose.yml_dockerfile_作成例:centos8_mysql8.0 [2020/11/09 18:37] humolife [docker/app/htdocs/.htaccess] |
ソフトウェア:docker:docker-compose.yml_dockerfile_作成例:centos8_mysql8.0 [2020/11/09 18:39] humolife [docker/db/conf.d/my.cnf] |
||
---|---|---|---|
行 6: | 行 6: | ||
├ docker | ├ docker | ||
│ ├ app | │ ├ app | ||
- | │ │ ├ htdocs | ||
- | │ │ │ └ .htaccess | ||
│ │ └ Dockerfile | │ │ └ Dockerfile | ||
│ ├ db | │ ├ db | ||
│ │ ├ conf.d | │ │ ├ conf.d | ||
- | │ │ │ └ my.cnf | + | │ │ │ └ charset.cnf |
│ │ └ Dockerfile | │ │ └ Dockerfile | ||
│ └ docker-compose.yml | │ └ docker-compose.yml | ||
行 74: | 行 72: | ||
===== docker/ | ===== docker/ | ||
< | < | ||
- | FROM mysql:latest | + | FROM mysql:8.0 |
- | COPY ./conf.d /etc/mysql/conf.d | + | |
+ | RUN apt-get update && \ | ||
+ | apt-get -y install locales-all | ||
+ | |||
+ | ENV LANG ja_JP.UTF-8 \ | ||
+ | LANGUAGE ja_JP:ja | ||
+ | |||
+ | COPY ./conf.d/ | ||
</ | </ | ||
- | ===== docker/ | + | ===== docker/ |
< | < | ||
[mysqld] | [mysqld] | ||
- | # Character code setting / collation order setting | + | character-set-server |
- | character_set_server=utf8mb4 | + | collation-server = utf8mb4_bin |
- | collation-server=utf8mb4_bin | + | init-connect='set names utf8' |
- | + | ||
- | default_authentication_plugin= mysql_native_password | + | |
- | [mysql] | + | [client] |
- | default-character-set=utf8mb4 | + | loose-default-character-set = utf8mb4 |
</ | </ | ||