Invalid volume specification trying to run portainer container

我的未来我决定 提交于 2019-12-11 17:32:35

问题


I'm trying to deploy portainer to my local docker. I'm running the Docker CE 18.0.6.0 version on Windows 10. I tried to follow the steps from these two pages:

  1. Portainer-Deployment

  2. Tutorial: Portainer for local Docker environments on Windows 10!

But all the times I have tried to run the following command:

docker run -d -p 9000:9000 --name portainer --restart always -v portainer_data:/data portainer/portainer -H tcp://10.0.75.1:2375

Docker responds always with the same message:

Error response from daemon: invalid volume specification: 'portainer_data:/data'

I created the volume using this command:

docker volume create portainer_data

Any idea what could be?


回答1:


The path syntax you used only works for Linux containers since Linux environments only have a single root to their filesystem tree. To run portainer container in a native Windows container, the syntax is:

docker run -d -p 9000:9000 --name portainer --restart always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine -v C:\ProgramData\Portainer:C:\data portainer/portainer

This comes from the deployment documentation.



来源:https://stackoverflow.com/questions/51712934/invalid-volume-specification-trying-to-run-portainer-container

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!