-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
Hi colleagues,
Steps to reproduce
Docker 3.1.0 (51484) running with WSL2 on Windows 10 version 1909.
I try to execute the script using Windows Powershell 7.1:
docker-compose -f "docker-compose.generated.json" up --build --remove-orphans --renew-anon-volumes --force-recreate --always-recreate-deps
The json file has the following section:
"volumes": {
"inputansibleconfigvolume": {
"driver_opts": {
"type": "none",
"device": "${ANSIBLE_CONFIGS}",
"o": "bind"
}
}
}
The Environment Variable ANSIBLE_CONFIGS is set to: /c/Dev/Git/folder
When I execute the command:
docker-compose -f "docker-compose.generated.json" up --build --remove-orphans --renew-anon-volumes --force-recreate --always-recreate-deps
A docker volume is created.
Actual:
device: "C:\c\Dev\Git\folder"
Or depending on different manipulations device value can be a slightly different but always in Windows style.
Expected:
device: "/c/Dev/Git/folder"
I tried:
COMPOSE_CONVERT_WINDOWS_PATHS=1
COMPOSE_CONVERT_WINDOWS_PATHS=0
This had no effect.
Workaround:
"volumes": {
"inputansibleconfigvolume": {
"external" true
}
}
docker volume create --name inputansibleconfigvolume -o type=none -o device=/c/Dev/Git/folder -o o=bind
Could you please check this?