docker build过程安装mysql, 到mysql密码设置部分卡死了,为何会这样?怎么办?

浏览:62日期:2023-02-22

问题描述

Unpacking libklibc (2.0.4-8ubuntu1.16.04.2) ...Selecting previously unselected package klibc-utils.Preparing to unpack .../klibc-utils_2.0.4-8ubuntu1.16.04.2_amd64.deb ...Adding ’persion of /usr/share/initramfs-tools/hooks/klibc to /usr/share/initramfs-tools/hooks/klibc^i-t by klibc-utils’Unpacking klibc-utils (2.0.4-8ubuntu1.16.04.2) ...

While not mandatory, it is highly recommended that you set a password for theMySQL administrative 'root' user.

If this field is left blank, the password will not be changed.

New password for the MySQL 'root' user: root

然后就卡死了,很久:(Ctrl+C 所有下载和镜像都报废的样子,累...

问题解答

回答1:

docker run --name mysql -e MYSQL_ROOT_PASSWORD=密码 -d mysql

相关文章: