docker-compose run multiple tasks without sharing dependencies
This sounds like you should pass the --project-name
or p
flag to docker-compose when doing docker-compose run
.
By default docker-compose creates volume and container names based on your project name with the name of the current directory as a default. So in your case you will have a volume name <cwd>_download-folder
. With container names <cwd>_selenium
and <cwd>_enma
.
If you want to have new volumes and a new selenium
container created on each docker-compose run
you just need to override its project name.
So if you do
$ docker-compose -p name1 run -d enma daio arg0 arg1 arg2
$ docker-compose -p name2 run -d enma daio arg0 arg1 arg2
You will end up with two created volumes, and four containers. Which seems to suit your needs, this will eliminate the enma
containers from sharing the same volume.
FYI you can view which volumes have been created by running docker volume ls
.
Hope this helps.