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

Windows deployment instructions unclear; example docker run command results in an error on Windows hosts #50

Closed
sadegroot opened this issue Jun 14, 2018 · 4 comments

Comments

@sadegroot
Copy link

sadegroot commented Jun 14, 2018

The Deployment page provides the following command to use a bind mount to persist Portainer's data on a Windows Docker host folder:

$ docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v C:\ProgramData\Portainer:C:\data portainer/portainer

However, the option -v /var/run/docker.sock:/var/run/docker.sock does not work on Windows hosts as the volume's source is a path to a Linux socket.

C:\Users\degroosa> docker volume create portainer_data
portainer_data

C:\Users\degroosa> docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v C:\ProgramData\Portainer:C:\data portainer/portainer
Unable to find image 'portainer/portainer:latest' locally
latest: Pulling from portainer/portainer
407ada6e90de: Pull complete
1b9ade35fece: Pull complete
6ebe19270dfc: Pull complete
11d6b9914c95: Pull complete
56bd384cf576: Pull complete
24f71abb899c: Pull complete
8664cad12452: Pull complete
Digest: sha256:2933caa6e578e94b5d91429ea7f47ae9741ee11b71d7cb740e76c5f234cc1d87
Status: Downloaded newer image for portainer/portainer:latest
docker: Error response from daemon: invalid volume specification: '/var/run/docker.sock:/var/run/docker.sock'.
See 'docker run --help'.

I realize that the typical setup on a Windows host is more complicated than what is described on this page (a more complete set of deployment instructions are linked to on the FAQ page), but the docs don't make this very clear, and the Windows command provided on the Deployment page will never run on Windows hosts, further adding to the confusion. In fact, providing just one command for Windows hosts and no other mention of deployment on Windows hosts is confusing as it may lead the reader to believe that this one command is the only difference between deploying Portainer on a Windows host vs. a Linux host.

Can we remove or fix the provided Windows command on the Deployment page? Also, perhaps it would be good to add a section specifically for Windows Docker host deployments to the Deployment page, rather than burying a more complete set of instructions in the FAQ page where users are less likely to check.

@deviantony
Copy link
Member

deviantony commented Jun 15, 2018

Ah, I feel like we're going to fight eternally to figure out how to create a simple deployment documentation for Windows users :-)

Just so you know, the command with the Unix socket bind mount will work on a Windows 10 host using Docker for Windows.

It will not work on a Windows server 2016 host using Docker on Windows. It can be confusing.

You should have a look at some external articles about how to deploy it on Windows server 2016 (such as https://portainer.readthedocs.io/en/stable/faq.html#how-can-i-setup-portainer-on-windows-server-2016).

I also feel that we need to make this clearer cc @ncresswell

@sadegroot
Copy link
Author

sadegroot commented Jun 15, 2018

Thanks for the clarification - I am indeed running Docker CE on Windows, not Docker CE for Windows. This issue can be closed, although it would be nice to see a little more clarity around deployments on Windows hosts in the docs :)

@deviantony
Copy link
Member

I'll keep this issue open as we still need to make this clearer IMO

@jefersonkaefer
Copy link

I just clicked on "Switch to linux container..." now it's working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants