Named pipe on Windows 10

Hi All, I'm new to traefik and docker.

I'm trying to run whoami example on Windows, but failed.

Windows: Windows 10 PRO 20H2

 docker version
 Cloud integration: 1.0.17
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.16.4
 Git commit:        f0df350
 Built:             Wed Jun  2 12:00:56 2021
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
  Version:          20.10.7
  API version:      1.41 (minimum version 1.24)
  Go version:       go1.13.15
  Git commit:       b0f5bc3
  Built:            Wed Jun  2 11:56:41 2021
  OS/Arch:          windows/amd64
  Experimental:     false


version: '2.4'
    image: traefik:v2.4.8-windowsservercore-1809
    command: --docker.endpoint=npipe:////./pipe/docker_engine
      - "8080:8080" # Please read:
      - "80:80"
    isolation: default # workaround for
      - .:C:/etc/traefik
      - type: npipe
        source: \\.\pipe\docker_engine
        target: \\.\pipe\docker_engine
    image: stefanscherer/whoami:windows-amd64-2.0.2
    isolation: default
      - "traefik.backend=whoami"
      - "traefik.frontend.entryPoints=http"
      - "traefik.frontend.rule=Host:whoami.docker.local"

When i run command "docker compose up", I got the following error:

❯ docker compose up
[+] Running 2/3
 - Network example_default      Created                                                                            0.9s
 - Container example_whoami1_1  Created                                                                            0.3s
 - Container example_traefik_1  Creating                                                                           0.3s
Error response from daemon: Unrecognised volume spec: file '\\.\pipe\docker_engine' cannot be mapped. Only directories can be mapped on this platform

How can i use named pipe in windows? Is it supported on Windows 10 and Docker on Windows?


Hello @owenchen,

I am not too familiar with docker on windows, however, it appears that the volume syntax you use differs based on what windows shell you are using (bash/ps/etc):

Could you try the suggestion in there to modify the volume configuration to use the slashes that match your shell?