首页 > Docker镜像在本地构建成功,但是运行起来的时候,镜像内部的Mysql启动出错

Docker镜像在本地构建成功,但是运行起来的时候,镜像内部的Mysql启动出错

docker version
Client version: 0.9.1
Go version (client): go1.2.1
Git commit (client): 3600720
Server version: 0.9.1
Git commit (server): 3600720
Go version (server): go1.2.1
git clone https://github.com/sameersbn/docker-redmine.git
cd docker-redmine
docker build -t xx/redmine .
docker logs -f $(docker run -d xx/redmine)
User: root Password: eiThoo9iecoa
sshd: started
mysqld: ERROR (abnormal termination)

看到吧。是mysqld启动问题。


我也遇到了这个问题,我是不加 -v /host/data:/var/lib/mysql 参数 就可以正常启动
加了之后 容器的 /var/lib/mysql 拥有者不是mysql 引起的权限问题,然后就起不来了
貌似是这样


我有在维护一个mysql的镜像,其中有涉及volume的处理代码,你可以运行看看是否这个镜像可以正常运行。
https://github.com/tutumcloud/tutum-docker-mysql

另外我写的另一篇blog里有关于mysql volume的介绍,可以参考一下:http://blog.tutum.co/2014/05/27/containerize-your-database-volume-with-tutum-mysql-images/

【热门文章】
【热门文章】