You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Question: Are docker-compose secrets supported on Windows Containers? #4829
I am trying to get secrets working with a service using Docker for Windows with Windows Containers, my top level compose file (Can add overrides if necessary) below:
When I build I get the following error:
Cannot create container for service web: invalid volume spec "/run/secrets/web_connectionstring": invalid volume specification: '\run\secrets\web_connectionstring'
Hence my question are secrets supported on Windows Containers? Or am I missing something.
Reacted by Dimitris Theodorou, Ezekiel Warren, Tyler Waters, mara8008 and Nagaraj8088
It's still a work in progress on the engine's end: moby/moby#32208
After that, there'll probably be more work needed for docker-compose to support it, so it might not come simultaneously (but if you deploy with docker stack deploy instead, it will be available)
I spent a lot of time today trying to work out what I was doing wrong. As Windows Containers become more mainstream, it might be good idea on docker documentation to state whether a feature is supported with Windows containers.
Reacted by Daan Oostindiën, mara8008 and psandeep09
I spent a lot of time today trying to work out what I was doing wrong. As Windows Containers become more mainstream, it might be good idea on docker documentation to state whether a feature is supported with Windows containers.
@JonJam I would also like a (more useful) runtime notice if a feature is used that is not fully implmented yet. Or perhaps even better: don't release fully implemented features.
@Scofield62 I didn't manage to make secrets work with docker-compose and Docker Toolbox. I think main problem is Docker Toolbox doesn't support docker-compose 3.1 well. And you need 3.1 (3.0 didn't support secrets). I suggest to you to buy Windows Pro on Ebay for 4$.
From what can I share with others:
Secrets works for me on Windows Pro with Docker 18.09.0, build 4d60db4and docker-compose version 1.23.2 BUT only if I cast docker-compose from cmd. From linux subsystem it doesn't work, also doesn't work from windows powershell, where I get error:
ERROR: for <service> Cannot start service <service>: error while creating mount source path '/host_mnt/c/.../.secrets/mysecret.json': mkdir /host_mnt/c: file exists
Once part with secret is removed from my docker-compose, it works everywhere.
Note that the volumes are translated fine, just the secrets are not. This is with COMPOSE_CONVERT_WINDOWS_PATHS=1 set.
Am I seeing the same thing that @JonJam is seeing?
I have a fix for the secrets path conversion. I still might have to use the env variable COMPOSE_CONVERT_WINDOWS_PATHS so compose doesn't convert paths when using windows containers but its working for linux containers, which was my problem.
Fix: #6595
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
shin- commentedon May 16, 2017
It's still a work in progress on the engine's end: moby/moby#32208
After that, there'll probably be more work needed for
docker-composeto support it, so it might not come simultaneously (but if you deploy withdocker stack deployinstead, it will be available)cc @dnephin
JonJam commentedon May 16, 2017
@shin- Thanks a lot for confirming this 👍.
I spent a lot of time today trying to work out what I was doing wrong. As Windows Containers become more mainstream, it might be good idea on docker documentation to state whether a feature is supported with Windows containers.
caphrim007 commentedon Oct 3, 2017
@shin- I think i am receiving the same error, but it looks (on my end) like the secrets are just not being translated to their unix-y paths.
here's a snippet from
docker-compose configNote that the volumes are translated fine, just the secrets are not. This is with
COMPOSE_CONVERT_WINDOWS_PATHS=1set.Am I seeing the same thing that @JonJam is seeing?
mikeblakeuk commentedon May 4, 2018
Any news on this? @shin / @dnephin
Scofield62 commentedon Dec 10, 2018
I am also interested in this. I am facing with this issue on Docker Toolbox. :( It is just working fine on docker for windows (as linux containers)
daaan commentedon Jan 2, 2019
Same issue here.
@JonJam I would also like a (more useful) runtime notice if a feature is used that is not fully implmented yet. Or perhaps even better: don't release fully implemented features.
EntityB commentedon Jan 5, 2019
@Scofield62 I didn't manage to make secrets work with docker-compose and Docker Toolbox. I think main problem is Docker Toolbox doesn't support docker-compose 3.1 well. And you need 3.1 (3.0 didn't support secrets). I suggest to you to buy Windows Pro on Ebay for 4$.
From what can I share with others:
Secrets works for me on Windows Pro with Docker 18.09.0, build 4d60db4and docker-compose version 1.23.2 BUT only if I cast docker-compose from cmd. From linux subsystem it doesn't work, also doesn't work from windows powershell, where I get error:
Once part with secret is removed from my docker-compose, it works everywhere.
jpcmadeira commentedon Apr 9, 2019
I have a fix for the secrets path conversion. I still might have to use the env variable COMPOSE_CONVERT_WINDOWS_PATHS so compose doesn't convert paths when using windows containers but its working for linux containers, which was my problem.
Fix: #6595
mara8008 commentedon Sep 23, 2019
Is there any work around available that docker compose 3.5 secrets work with docker toolbox 19.03.1 on Windows 8?
I see the same issue as @JonJam mentioned.
stale commentedon Mar 21, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stale commentedon Mar 28, 2020
This issue has been automatically closed because it had not recent activity during the stale period.