Multiple Directories
Closed this issue · 3 comments
It would be nice to add in the readme that one can add multiple /data directories I tested with docker-compose, did not test with docker commands
volumes:
- /FIRST_DATA_DIR:/data/
- /SECOND_DATA_DIR:/data/
- /CONFIG_DIR:/config
You'll have to add a path after /data/
otherwise I think that Docker will detect a conflict because /data
will be binded twice.
Try this:
volumes:
- /FIRST_DATA_DIR:/data/first
- /SECOND_DATA_DIR:/data/second
- /CONFIG_DIR:/config
Hi @Ironhydroxide,
Sorry for the late response. I've updated the readme as this question was already discussed in #4 and seems to be quite popular. As for your example, I'm not sure that it is correct. @alexislefebvre pointed correctly that there should be conflicts, you cannot map multiple sources to one target, you need to mount source directories as /data
subdirectories.
You'll have to add a path after
/data/
otherwise I think that Docker will detect a conflict because/data
will be binded twice.Try this:
volumes: - /FIRST_DATA_DIR:/data/first - /SECOND_DATA_DIR:/data/second - /CONFIG_DIR:/config
Yes, Not sure how my initial comment didn't have that, that's how I have it setup. with two separate directories, /data/1 /data/2
@hurlenko Thank you for updating the readme,