【发布时间】:2016-09-14 16:05:09
【问题描述】:
您好,我正在尝试直接在我的 Dockerfile 中使用 mysql_config_editor 工具:
FROM mysql
RUN mysql_config_editor set --login-path=local --user=root --password
但是这个命令要求用户输入密码。知道不能直接在命令行设置密码,有没有办法直接从 Dockerfile 设置密码。
root@d80484a3177f:~# mysql_config_editor set --login-path=local --user=root --password
Enter password:
root@d80484a3177f:~# mysql_config_editor set --login-path=local --user=root --password=root
mysql_config_editor: [ERROR] mysql_config_editor: option '--password' cannot take an argument
谢谢
【问题讨论】:
标签: mysql bash docker dockerfile