-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Support advanced mounts syntax #5363
Conversation
14e4805
to
b48feff
Compare
8addab5
to
a594bef
Compare
Signed-off-by: Joffrey F <joffrey@docker.com>
Tried commit a594bef with version: "3.2"
services:
test:
image: microsoft/windowsservercore
volumes:
- C:\\Users\\stefan\\.ssh:C:\\ssh
networks:
default:
external:
name: nat but still see this error, both on a Windows host as well as remote from a Mac against a Windows Docker host.
|
Can you try with version 3.4 instead? |
With version 3.4 it shows
Both with a Windows docker-compose.exe and a Mac docker-compose binary. |
Okay, thanks for taking the time to check this, really appreciate it =) |
Closing in favor of #5436 |
Should this work with 1.18.0-rc1? It doesn't work for me for windows paths and the npipe. |
Are you writing it like this?
It won't work with the short syntax. For the Windows paths from a UNIX client, unfortunately I had to postpone it. It's more intricate than I originally thought. I'm hoping to have a reasonable solution for it in 1.19. |
I have tried it with the Windows docker-compose.exe. I‘ll try your sugested way. |
Thanks. This works: version: "3.5"
services:
test:
image: stefanscherer/docker-cli-windows
volumes:
- type: npipe
source: \\.\pipe\docker_engine
target: \\.\pipe\docker_engine
- type: bind
source: C:\Users\stefan\.ssh
target: C:\ssh
command: docker version
networks:
default:
external:
name: nat |
It also works from a Mac running a Windows Server 1709 VM with same VM mount points ( /Users/stefan = C:\Users\stefan in the Windows VM ). 💯 version: "3.5"
services:
dockercli:
image: stefanscherer/docker-cli-windows
volumes:
- type: npipe
source: \\.\pipe\docker_engine
target: \\.\pipe\docker_engine
command: docker version
sshcli:
image: microsoft/nanoserver:1709
volumes:
- type: bind
source: C:\Users\stefan\.ssh
target: C:\ssh
command: cmd /c dir c:\ssh
networks:
default:
external:
name: nat
|
@StefanScherer I get this error:
It seems it's not possible to use this (By the way, I'm running Traefik:)
|
@Getitdan it depends on the windows host, the Docker engine version and also the Docker images used. |
@StefanScherer Thanks a lot for your response. I'm using Windows 10 pro 64 bit, fully updated (no updated are pending, so I guess I have the "April update", no?). My Docker for Windows is also the latest: 18.06.0-ce-win70 (19075). So the only option is to use Insider builds? My server OS is ubuntu, but my development computer is Windows and I wanted to run docker locally, before deploying it to the Ubuntu server. What do other developers do? No one runs docker locally on Windows 10? I guess not everyone has a Mac OS / Linux. My temporary workaround is to use a shared folder with a virtualbox running Ubuntu, and there to run docker properly for development. But it is not preferable. I simply can't understand what do other developers with Windows 10 do. |
@Getitdan Now I understand you want to bind the named pipe from the Windows host into a Linux container unix socket. |
@StefanScherer Thanks again! I'll keep using my workaround using a staging VirtualBox. But just out of curiosity, what are other uses for using named pipe in docker? Isn't it always for binding from a host into a container? And second thing: didn't you mean connecting named pipe with a named pipe on Linux? Because I guess it should be equivalent (don't we need named pipes on both host & guest, and eliminate unix socket on the latter?). Thanks a lot! |
@Getitdan if you're just running Linux containers on Windows and need to access the Docker daemon for some reason, you want to mount You can't use named pipes inside Linux containers because named pipes as a concept are Windows-specific. HTH |
Thanks @shin, you are right. I'm just running Linux containers on Windows, but cannot access the Docker daemon. I cannot mount
I thought it happens because my Windows host cannot handle the unix socket, so I tried to use a named pipe instead. Doesn't Linux support named pipes? I think it uses the How would you suggest me to "wire" my volume configuration? Update: |
Fixes #5181
Fixes #5244