Open maxhr opened 5 years ago
Hello @maxhr Thank you for reporting this issue.
Is there any temporary workaround for this one?
We are addressing this issue among others on render, with #602 . I think it should fix this particular issue. cc @aiordache
I was testing this issue with 0.9.0-zeta1.
Things has changed, but there are still things to clarify.
Having volume:
volumes:
- "./db_tisapi:/var/lib/postgresql/data"
- "./db_tisapi_init:/docker-entrypoint-initdb.d"
rendering results in:
volumes:
- type: bind
source: /cnab/app/ttt.dockerapp/db_tisapi
target: /var/lib/postgresql/data
- type: bind
source: /cnab/app/ttt.dockerapp/db_tisapi_init
target: /docker-entrypoint-initdb.d
so it ignores current directory and assumes, that the relative folder is relative to folder /cnab/app
.
This makes rendering of docker-compose.yml
not usable for docker-compose
command.
Possible solutions:
docker app render
for docker-compose
using volumes bound to relative folder. Call this use case as out of scope for docker app
.--render-mode
with options docker-compose
and app
. docker-compose
would respect relative folders, app
would assume relative folders to be relative to /cnab/app
. Default render-mode
would be app
.--volumes-root
defaulting to /cnab/app
.I would prefer the render-mode solution as it brings real value to docker-compose
users allowing to parametrize the application as needed.
Description Mounting a relative path - such as
./mounted-folder
- renders asmounted-folder
. Then when runningdocker-compose up
I receive this error:invalid mount config for type "bind": invalid mount path: 'mounted-folder' mount path must be absolute
. I would expect thesource
path to stay as is.Steps to reproduce the issue:
.dockerapp
file{}
version: "3.6" services: hello: image: my-image volumes:
Describe the results you expected:
Output of
docker version
:Output of
docker-app version
:Output of
docker info
: