尝试运行portainer容器的卷规格无效 [英] Invalid volume specification trying to run portainer container
问题描述
我正在尝试将portainer部署到我的本地docker.我正在Windows 10上运行Docker CE 18.0.6.0版本.我尝试按照以下两个页面中的步骤进行操作:
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:
教程:Windows上本地Docker环境的Portainer 10!
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总是以相同的消息响应:
Docker responds always with the same message:
来自守护程序的错误响应:无效的卷规范: 'portainer_data:/data'
Error response from daemon: invalid volume specification: 'portainer_data:/data'
我使用以下命令创建了卷:
I created the volume using this command:
docker volume create portainer_data
有什么想法吗?
推荐答案
您使用的路径语法仅适用于Linux容器,因为Linux环境的文件系统树只有一个根.要在本地Windows容器中运行portainer容器,语法为:
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
这来自部署文档.
这篇关于尝试运行portainer容器的卷规格无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!