Closed maurerle closed 6 months ago
@maurerle Thanks for the PR. Is tilde volume mapping specified in the compose spec? I couldn't find it.
I think that this is not documented here: https://github.com/compose-spec/compose-spec/blob/master/07-volumes.md
It just says that the destination can be a part inside the docker container - so any valid unix path would be fine, including those starting with a tilde ~
If it does not start with an absolute path - say plain data
, docker compose
says invalid mount path: 'data' mount path must be absolute
- so ~ is interpreted as a valid absolute path..
OK, replicating undocumented behavior is fine. I was just concerned that this is documented in the spec but I can't find it.
I don't know what happened but somehow this does not work with docker compose either.. ~/data:rw': invalid mount config for type "bind": invalid mount path: '~/data' mount path must be absolute
Weird - problem some wrong assumptions i had when testing before..
Sorry for that.
It is supported in docker compose to have a volume mapping like
/foo:~/data
which should also be supported by podman compose.This PR allows using this too.