我正在尝试在ubuntu可靠的Vagrant VM中启动一个mysql docker容器:
docker run --name my-container-name -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql/mysql-server:5.6
容器在大约12秒后启动和停止。
查看日志我可以看到以下内容:
...
Finished mysql_install_db
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
/entrypoint.sh: line 31: 58 Killed mysqld --user=mysql --datadir="$DATADIR" --skip-networking
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process failed.
知道为什么mysqld进程被杀了? vagrant VM安装了最新的docker(1.8.2)。
在我的Windows机器(boot2docker)上运行相同的命令可以正常工作。
答案 0 :(得分:2)
好的 - 不知道究竟发生了什么,但它似乎与实际的流浪盒有关。不会在" ubuntu / trusty64"上工作。使用" puphpet / ubuntu1404-x64" mysql按预期启动。
答案 1 :(得分:1)
尝试使用
查看日志中的任何错误docker ps -a
docker logs {mysql sha}
您应该能够看到mysql显示的错误。
您的脚本如何运行命令?