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

Can't install portainer image on Windows 10: The source path "C:/ProgramData/Portainer" doesn't exist #2575

Closed
reedv opened this issue Dec 25, 2018 · 7 comments

Comments

@reedv
Copy link

commented Dec 25, 2018

Bug description

Following installation docs (https://portainer.readthedocs.io/en/latest/deployment.html#windows), running into error

$ docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v C:\ProgramData\Portainer:/data portainer/portainer
docker: Error response from daemon: Mount denied:
The source path "C:/ProgramData/Portainer"
doesn't exist and is not known to Docker.
See 'docker run --help'.

Expected behavior

Expected no errors and to be able to access Portainer via port 9000 on host machine.

Steps to reproduce the issue:

As per the installation docs found here: https://portainer.readthedocs.io/en/latest/deployment.html#windows

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

Technical details:

  • OS Name: Microsoft Windows 10 Pro
  • Version: 10.0.17134 Build 17134
  • Portainer version: NA
  • Docker version (managed by Portainer): Docker version 18.09.0, build 4d60db4
  • Platform (windows/linux): Windows
  • Command used to start Portainer (docker run -p 9000:9000 portainer/portainer):
    docker run -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v C:\ProgramData\Portainer:/data portainer/portainer
  • Browser: Google Chrome

Additional context

Fairly new to using docker, so please let me know if should provide any other useful debugging information and how.

@reedv reedv changed the title Can run example portainer image on Windows 10: The source path "C:/ProgramData/Portainer" doesn't exist Can't install portainer image on Windows 10: The source path "C:/ProgramData/Portainer" doesn't exist Dec 25, 2018

@deviantony

This comment has been minimized.

Copy link
Member

commented Dec 26, 2018

Hi @reedv

Sounds like permissions issues, can you create folders inside C:\ProgramData\ ? You might want to use another destination folder.

cc @ssbkang

@reedv

This comment has been minimized.

Copy link
Author

commented Dec 27, 2018

@deviantony

May be an issue with portainer not automatically creating the needed Portainer folder if not exists (not sure if this is intentional or not (did not see it mentioned in the installation instructions)).
Was able to create new folders within the C:\ProgramData\ dir.
Checking the folder permissions shows

$ icacls ProgramData
ProgramData NT AUTHORITY\SYSTEM:(OI)(CI)(F)
            BUILTIN\Administrators:(OI)(CI)(F)
            CREATOR OWNER:(OI)(CI)(IO)(F)
            BUILTIN\Users:(OI)(CI)(RX)
            BUILTIN\Users:(CI)(WD,AD,WEA,WA)

Creating a folder ProgramData_TEST on the Desktop and running

$ docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v C:\Users\rvillanueva\Desktop\ProgramData_TEST\Portainer:/data portainer/portainer
docker: Error response from daemon: Mount denied:
The source path "C:/Users/me/Desktop/ProgramData_TEST/Portainer"
doesn't exist and is not known to Docker.
See 'docker run --help'.

you can see it returns a similar error. Yet, after manually creating the Portainer folder within that Dektop dir. and rerunning

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

it then seems to run as expected, asking me to authorize permission to share C drive and such.

@deviantony

This comment has been minimized.

Copy link
Member

commented Dec 28, 2018

This issue is actually more related to Docker on Windows than Portainer. When bind-mounting a folder via -v C:\Users\rvillanueva\Desktop\ProgramData_TEST\Portainer:/data, Docker should take care of the creation of the C:\Users\rvillanueva\Desktop\ProgramData_TEST\Portainer on the host.

Might be worth adding a note about this in our documentation though.

@deviantony deviantony added this to the next milestone Dec 28, 2018

@reedv

This comment has been minimized.

Copy link
Author

commented Dec 28, 2018

Got it, thanks.

@reedv reedv closed this Dec 28, 2018

@deviantony deviantony reopened this Dec 28, 2018

@deviantony

This comment has been minimized.

Copy link
Member

commented Dec 28, 2018

Keeping it open to add a note in our docs.

@davidshq

This comment has been minimized.

Copy link

commented Aug 25, 2019

FYI, I ran into this problem. Would love to see the documentation have yet a little more clarity. Here is what I did to get things up and running: https://davemackey.net/2019/08/25/a-few-hints-for-getting-portainer-running-on-windows/

@itsconquest

This comment has been minimized.

Copy link
Member

commented Sep 17, 2019

The documentation was updated via this PR on the portainer-docs repo so this issue is resolved

@deviantony deviantony removed this from the next milestone Sep 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.