compose
compose copied to clipboard
`npipe` volumes no longer work in `compose.yaml` files since v2.0.0
Description
docker-compose v2 no longer supports npipe volume bind mounts for windows containers.
Steps to reproduce the issue:
- Create docker-compose.yaml:
version: '3.7' services: dev: image: hello-world:nanoserver platform: windows volumes: - type: npipe source: '\\.\pipe\docker_engine' target: '\\.\pipe\docker_engine' docker compose up
Describe the results you received:
PS C:\src\win-docker\test> docker compose up
[+] Running 1/1
- Network test_default Created
- Container test-dev-1 Creating
Error response from daemon: Unrecognised volume spec: file '\\.\pipe\docker_engine' cannot be mapped. Only directories can be mapped on this platform
Describe the results you expected:
PS C:\src\win-docker\test> docker compose up
[+] Running 1/0
- Network test_default Created
- Container test-dev-1 Created
Attaching to test-dev-1
test-dev-1 |
test-dev-1 | Hello from Docker!
test-dev-1 | This message shows that your installation appears to be working correctly.
test-dev-1 |
test-dev-1 | To generate this message, Docker took the following steps:
test-dev-1 | 1. The Docker client contacted the Docker daemon.
test-dev-1 | 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
test-dev-1 | (windows-amd64, nanoserver-1809)
test-dev-1 | 3. The Docker daemon created a new container from that image which runs the
test-dev-1 | executable that produces the output you are currently reading.
test-dev-1 | 4. The Docker daemon streamed that output to the Docker client, which sent it
test-dev-1 | to your terminal.
test-dev-1 |
test-dev-1 | To try something more ambitious, you can run a Windows Server container with:
test-dev-1 | PS C:\> docker run -it mcr.microsoft.com/windows/servercore:1809 powershell
test-dev-1 |
test-dev-1 | Share images, automate workflows, and more with a free Docker ID:
test-dev-1 | https://hub.docker.com/
test-dev-1 |
test-dev-1 | For more examples and ideas, visit:
test-dev-1 | https://docs.docker.com/get-started/
test-dev-1 |
test-dev-1 exited with code 0
Additional information you deem important (e.g. issue happens only occasionally):
This worked with docker-compose v1.x:
PS C:\src\win-docker\test> & "C:\Program Files\Docker\Docker\resources\bin\docker-compose.exe" --version
docker-compose version 1.29.2, build 5becea4c
PS C:\src\win-docker\test> & "C:\Program Files\Docker\Docker\resources\bin\docker-compose.exe" up
Recreating test-dev-1 ... done
Attaching to test_dev_1
dev_1 |
dev_1 | Hello from Docker!
dev_1 | This message shows that your installation appears to be working correctly.
dev_1 |
dev_1 | To generate this message, Docker took the following steps:
dev_1 | 1. The Docker client contacted the Docker daemon.
dev_1 | 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
dev_1 | (windows-amd64, nanoserver-1809)
dev_1 | 3. The Docker daemon created a new container from that image which runs the
dev_1 | executable that produces the output you are currently reading.
dev_1 | 4. The Docker daemon streamed that output to the Docker client, which sent it
dev_1 | to your terminal.
dev_1 |
dev_1 | To try something more ambitious, you can run a Windows Server container with:
dev_1 | PS C:\> docker run -it mcr.microsoft.com/windows/servercore:1809 powershell
dev_1 |
dev_1 | Share images, automate workflows, and more with a free Docker ID:
dev_1 | https://hub.docker.com/
dev_1 |
dev_1 | For more examples and ideas, visit:
dev_1 | https://docs.docker.com/get-started/
dev_1 |
test_dev_1 exited with code 0
Output of docker compose version:
Docker Compose version v2.4.1
Output of docker info:
Client:
Context: default-win
Debug Mode: false
Plugins:
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
compose: Docker Compose (Docker Inc., v2.4.1)
scan: Docker Scan (Docker Inc., v0.8.0)
Server:
Containers: 18
Running: 0
Paused: 0
Stopped: 18
Images: 58
Server Version: 20.10.14
Storage Driver: windowsfilter (windows) lcow (linux)
Windows:
LCOW:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 19044 (19041.1.amd64fre.vb_release.191206-1406)
Operating System: Windows 10 Pro Version 2009 (OS Build 19044.1645)
OSType: windows
Architecture: x86_64
CPUs: 64
Total Memory: 127.9GiB
Name: /* omitted for PII */
ID: /* omitted for PII */
Docker Root Dir: C:\ProgramData\Docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Additional environment details: