I’m creating a docker file for sphinxsearch and having issues with the content of the container being overwritten.
docker run --name some-sphinx -v ~/path/to/host:/usr/local/sphinx mysphinx
Instead of binding the content in the directory in the container to the host, it overwrites the container with an empty directory in place of what existed.
In the mysql docker container, if you mount a directory from the host to /var/lib/mysql it works fine, copying the contents to the host.
I was under the impression that it was a 2-way bind and that it would know to copy from container to host since host was empty and not created.
Maybe i’m not understanding this right, I would appreciate if someone can shed some light on this for me. I am now trying to get RabbitMQ in a docker container and would like to mount the data & config dirs to a local directory on my host machine. I am running into the same issue where it comes up empty and causes the container to have an empty dir in place of what I tried to mount. It works with MySQL, but doesn’t work with sphinx and rabbit, not sure what I am doing wrong or maybe I just don’t understand the -v flag.
This is from a while back and I didn’t get any help on what I was asking. I did come up with a solution for my Dockerfile and exposing what I wanted as far as the directories etc…
What problems are you having exactly, maybe I have the solution with what I ended up working out???