我试图让我的mysql图像运行utf-8编码.我的docker-compose文件看起来像:
version: '2'
services:
db:
container_name: zoho-grabber-db-development
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=topsecret
- MYSQL_DATABASE=development
- MYSQL_USER=devuser
- MYSQL_PASSWORD=secure
ports:
- "3306:3306"
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
Run Code Online (Sandbox Code Playgroud)
当我运行它,它说
$ docker-compose -f docker-compose.development.yml up
Removing zoho-grabber-db-development
Recreating 1b341fd7916e_1b341fd7916e_zoho-grabber-db-development
ERROR: for db Cannot start service db: oci runtime error: container_linux.go:247: starting container process caused "exec: \"mysqld\": executable file not found in $PATH"
ERROR: Encountered errors while bringing up the project.
Run Code Online (Sandbox Code Playgroud)
为什么找不到mysqld?以及如何实现我的目标?