0

I am using Docker Toolbox 1803 under Windows 10 64bit.

I am trying to run docker zipkin in my local system, and got failure when ran the following command in Toolbox GuickStart Terminal.

docker-compose -f docker-compose.yml -f docker-compose-cassandra.yml up

The following line of docker-compose.yml caused the problem.

version: '2'

  ...
  prometheus:

    volumes:
      - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml

The failure info is like following:

ERROR: for 80b791289250_prometheus  Cannot start service prometheus: b'OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \\"rootfs_linux.go:58: mounting \\\\\\"/e/FreelanceProjects/myapp/docker-zipkin/prometheus/prometheus.yml\\\\\\" to rootfs \\\\\\"/mnt/sda1/var/lib/docker/aufs/mnt/277f74637f71455a7b1ab4e421cf629b926f3bcbe216c3e109e029c49502b5a1\\\\\\" at \\\\\\"/mnt/sda1/var/lib/docker/aufs/mnt/277f74637f71455a7b1ab4e421cf629b926f3bcbe216c3e109e029c49502b5a1/etc/prometheus/prometheus.yml\\\\\\" caused \\\\\\"not a directory\\\\\\"\\"":Starting zipkin                  ... done
 if the specified host path exists and is the expected type'

ERROR: for prometheus  Cannot start service prometheus: b'OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \\"rootfs_linux.go:58: mounting \\\\\\"/e/FreelanceProjects/myapp/docker-zipkin/prometheus/prometheus.yml\\\\\\" to rootfs \\\\\\"/mnt/sda1/var/lib/docker/aufs/mnt/277f74637f71455a7b1ab4e421cf629b926f3bcbe216c3e109e029c49502b5a1\\\\\\" at \\\\\\"/mnt/sda1/var/lib/docker/aufs/mnt/277f74637f71455a7b1ab4e421cf629b926f3bcbe216c3e109e029c49502b5a1/etc/prometheus/prometheus.yml\\\\\\" caused \\\\\\"not a directory\\\\\\"\\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type'
ERROR: Encountered errors while bringing up the project. 

UPDATE: I have set env variable COMPOSE_CONVERT_WINDOWS_PATHS=1, it still does not work.

Update: Switched to Docker for Windows and WSL2. The experience is great enough, but sadly I have to give up my VirutalBox.

Hantsy
  • 8,006
  • 7
  • 64
  • 109
  • The issue is probably not related to the fact that the path is relative (you can see that Docker expands the path correctly - `/e/FreelanceProjects/myapp/docker-zipkin/prometheus/prometheus.yml`). You probably haven't shared your Windows drive with Docker's virtual machine. Please refer to this question: [Docker : Sharing a volume on Windows with Docker toolbox](https://stackoverflow.com/questions/34161352/docker-sharing-a-volume-on-windows-with-docker-toolbox) – jannis Jul 09 '18 at 06:59
  • @jannis Maybe this is a shared folder problem, but why it can not be fixed in compose/machine itself. I have encountered this issue for a long time, for cross os requirement, it is a big problem. – Hantsy Jul 10 '18 at 07:08
  • What do you mean by "why it can not be fixed in compose/machine itself"? What would you expect Docker Compose do in this case? – jannis Jul 10 '18 at 07:28
  • When I set `./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml` in volumes, why it can not be set it automatically. – Hantsy Jul 10 '18 at 08:41
  • This is not a question for me I guess, I may only assume that it's somehow related to security. You can post a question in [docker-machine issue tracker](https://github.com/docker/machine/issues) if you wish. I don't know if you'll get an answer though as docker-machine is currently deprecated. [Docker for Windows](https://docs.docker.com/docker-for-windows/) is the recommended Docker engine for the Windows platform nowadays (it has a configuration GUI for sharing drives). – jannis Jul 10 '18 at 13:49
  • @jannis Switched to Docker for Windows and used WSL 2 and resovled a lot of problems. – Hantsy Feb 04 '21 at 05:24

0 Answers0