Cannot not restart a docker container with existing mounted host directory

749 Views Asked by At

I pulled a nginx+php container (https://hub.docker.com/r/imagine10255/centos6-lnmp-php56/) and had started that, it will create a folder to specific location i.e.(D:\xampp\htdocs\centos6-lnmp-php56\home\website), but now i can't restart it, anyone know how to do restart it with out deleting the folder above ?

error message is here:

Error response from daemon: Cannot restart container centos6-lnmp-php56: error while creating mount source path '/c/Users/hkveg/Documents/Kitematic/centos6-lnmp-php56/home/website': mkdir /c/Users/hkveg/Documents/Kitematic/centos6-lnmp-php56: file exists

command tried:

$ docker restart centos6-lnmp-php56

Error response from daemon: Cannot restart container centos6-lnmp-php56: error while creating mount source path '/c/Users/hkveg/Documents/Kitematic/centos6-lnmp-php56/home/website': mkdir /c/Users/hkveg/Documents/Kitematic/centos6-lnmp-php56: file exists

As same as mysql container: $ docker restart mysql

Error response from daemon: Cannot restart container mysql: error while creating mount source path '/c/Users/hkveg/Documents/Kitematic/mysql/var/lib/mysql': mkdir /c/Users/hkveg/Documents/Kitematic/mysql: file exists

0

There are 0 best solutions below