Compose: docker-compose creates directories instead of files

Created on 7 Sep 2016  路  3Comments  路  Source: docker/compose

In this configuration docker-compose up shows cat: /tmp/my-templates/mysite.template: Is a directory but mysite.template is file with small nginx config. What's wrong I'm doing or this is the bug?

docker-compose.yml:

app-d-webserver:
  image: nginx
  container_name: app-d-webserver
  volumes:
  - ./nginx:/tmp/my-templates
  ports:
  - "8080:80"
  command: /bin/bash -c "cat /tmp/my-templates/mysite.template;"

Windows 10, latest
docker-compose version:

docker-compose version 1.8.0, build d988a55
docker-py version: 1.9.0
CPython version: 2.7.11
OpenSSL version: OpenSSL 1.0.2d 9 Jul 2015

docker version:

docker version
Client:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 21:15:28 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 21:15:28 2016
 OS/Arch:      linux/amd64

BTW, after restarting docker daemon No such file or directory, what? I don't understand at all.

arevolumes grouwindows-client kinbug

All 3 comments

Thanks for the report!

Do you have the same issue if you run the equivalent CLI command? i.e.

docker.exe run -v "$pwd/nginx:/tmp/my-templates" -p 8080:80 nginx /bin/bash -c "cat /tmp/my-templates/mysite.template;"

(I think that's valid Powershell, if it isn't hopefully you can figure it out how to make it look right :fearful: )

@shin- thats valid line and it works the same: writes cat: /tmp/my-templates/mysite.template: No such file or directory and exits. Also I've tried this issue on latest beta version, and the problem is not gone.


I've just resolved my problem but I can't find documentation on this theme.
Solution:

  • Share the whole C drive (but E:/* doesn't work)

Excuse for troubling if I was just inattentive.

@bitver Glad you were able to figure it out. There is some info on this in the Docker for Windows docs, but it's admittedly brief. If you have any suggestions to improve it, please create an issue on the Docker for Windows bugtracker to let the folks over there know!

Was this page helpful?
0 / 5 - 0 ratings