I've got a problem with my docker configuration on windows 7. I'm using docker toolbox.
Previously my config worked perfectly, but now it cause an error.
DOCKER> I/O Error [Unable to start container id [7b5a4bd7ccfd] : OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"rootfs_linux.go:58: mounting \\\"/c/Users/myProject/zip/src/elastic/elasticsearch.yml\\\" to rootfs \\\"/mnt/sda1/var/lib/docker/overlay2/f2f7c25fc05de0ec45cef945b0917beefe26bd1d0a31546378c2ffabfb905ccb/merged\\\" at \\\"/mnt/sda1/var/lib/docker/overlay2/f2f7c25fc05de0ec45cef945b0917beefe26bd1d0a31546378c2ffabfb905ccb/merged/usr/share/elasticsearch/config/elasticsearch.yml\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type (Bad Request: 400)]
I've investigated problem and found that docker mount elasticsearch.yml file as folder, but in host it exists as file. Does anyone knows how could it be?
<volumes>
<bind>
<volume>${basedir}/src/elastic/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml</volume>
</bind>
</volumes>
I expect that docker fount that file as file.
Thanks a lot
According to the tags you're using docker toolbox on windows. Mounting volumes in this context is a bit different and needs more effort.
I suggest you to read this article where you should find the answer for your problem: https://medium.com/@Charles_Stover/fixing-volumes-in-docker-toolbox-4ad5ace0e572
Also, make sure that your env variable base_dir is correctly set.
Good luck