-
Notifications
You must be signed in to change notification settings - Fork 227
Issues with current folder references #6
Comments
Hi, However, I will make further investigation to fix the application to support relative paths. |
For now I moved the server out of docker to fix the issue as I have delivery of a project dependent on this. There are some caveats that needs to be worked out. if we map a folder like |
I've made several tests, I came to the conclusion that the problem is caused by Compose itself while running inside a container. I've tried to mount a volume with docker-compose inside a container based on the official centos image and then another one based on dduportal/docker-compose. In both cases I didn't manage to mount a volume. I've also found some information about the problem on the following links: dduportal/docker-compose/#volumes-relative-and-absolute (check also the workaround suggested by kayvan in the comments) and https://github.com/dduportal/dockerfiles/issues/5 I will close the issue, feel free to reopen if necessary. |
My solution is to define environment variable "COMPOSEDIR" on compuse ui docker-compose.yml as follows:
The volume relative to the directory defined in "COMPOSEROOT" can then be referenced in the docker-compose.yml of other service (e.g. ovs) as follows:
I also tried to replace the variable name "COMPOSEROOT" with "PWD". It seems fine. For your info. |
Hi Tommy, it seems a good solution thanks for your contribution |
I have a docker-compose.yml which refers to the folders in current directory
The file is there in the ./scripts folder but your API doesn't bring it up fine and I get an error that infinite.sh file is not there. Since you are running it in a docker-container I believe the mapping doesn't happen properly
The text was updated successfully, but these errors were encountered: