Docker Community Forums

Share and learn in the Docker community.

Docker Compose service container creation failure

I am following the Getting Started section of the Docker Compose tutorial and at Step 4, I am getting the following error:

Named volume “C\Users\Documents\misc-docker-tutorial\composetest:/code:rw” is used in service “web” but no declaration was found in the volumes section. The only resource I could find on this subject was https://github.com/ClusterHQ/dvol/issues/67 which doesn’t appear to have a resolution.

Adding a slash in front of the volume name (thusly, \C\Users\Documents…:/code:rw) solves the above issue but returns a different error message:

ERROR: for web Cannot create container for service web: create \C\Users\Documents\misc-docker-tutorial\composetest: “\C\Users\Documents\misc-docker-tutorial\composetest” includes invalid characters for a local volume name, only “[a-zA-Z0-9][a-zA-Z0-9_.-]” are allowed
Encountered errors while bringing up the project.

docker info
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 6
Server Version: 1.12.5
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 13
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.39-boot2docker
Operating System: Boot2Docker 1.12.5 (TCL 7.2); HEAD : fc49b1e - Fri Dec 16 12:44:49 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 995.8 MiB
Name: default
ID: ODLN:5G5K:IDYK:P4PP:6QYL:WTKN:7FU7:ONKD:U4W3:3MMR:D7NG:7D6Z
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 23
Goroutines: 35
System Time: 2016-12-27T09:11:42.274326932Z
EventsListeners: 0
Username: bstchan
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox
Insecure Registries:
127.0.0.0/8


What seems to be the issue?