Docker Community Forums

Share and learn in the Docker community.

Why is docker failing to mount o a volume and start on Centos 7?


(Juliocesargarcia) #1

I hope I have not missed something obvious. I am very new to docker. I also asked this question here.

The command I am running is this:

docker -D run --name mysql5.6 -v /tmp/mysql:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=blah -p 22 -p 3306 -d mysql:5.6

The output generated is this:

DEBU[0000] End of CmdRun(), Waiting for hijack to finish.

And the container does not start.

I have disabled SELinux

SELinux status: disabled

I have also tried the chcon command:

sudo chcon -Rt svirt_sandbox_file_t mysql

Nothing works. The only thing that works is to make the file mysql/my.cnf writeable by “other”.

What is really strange is that I have another CentOS 7 system where this does work. I cannot explain the difference between these to systems. They are identical, as best as I can tell. They both now have this version of docker:

docker.x86_64 1.8.2-10.el7.centos @extras
docker-selinux.x86_64 1.8.2-10.el7.centos @extras

What am I missing?