When expanding the environment variable WD
from docker-compose.yaml in Dockerfile,
and running docker compose up --build -d ...
(see justfile > command: just docker-build
)
paths like /usr/home/myapp
would be bafflingly
replaced by C:/Program Files/Git/usr/home/myapp
.
This bug occurs on Windows when using the Git Bash console as is a known issue, see https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md.
Whilst there a new release of Git Bash may solve this issue, a work around that work with older versions is to simply replace
DOCKER_WORKDIR="/usr/home/${DOCKER_APP}"
via
DOCKER_WORKDIR="//usr/home/${DOCKER_APP}"
in the .env file.
By replacing //
by /
, such forced expansions are avoided.