Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose creates directories instead of files #3917

Closed
bitver opened this issue Sep 7, 2016 · 3 comments
Closed

docker-compose creates directories instead of files #3917

bitver opened this issue Sep 7, 2016 · 3 comments

Comments

@bitver
Copy link

bitver commented Sep 7, 2016

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.

@shin-
Copy link

shin- commented Sep 8, 2016

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 😨 )

@bitver
Copy link
Author

bitver commented Sep 8, 2016

@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.

@shin-
Copy link

shin- commented Sep 8, 2016

@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!

@shin- shin- closed this as completed Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants