一尘不染

创建安装源路径'/host_mnt/c/Users/xxx/redis.conf'时出错:mkdir / host_mnt / c / Users /xxx:权限被拒绝

docker

我正在搜索与我的问题类似的问题,但尚未找到好的解决方案。我正在尝试建立我的环境。

我们必须设置的第一件事是portainer
docker run -d -p 9000:9000 portainer / portainer

然后我们尝试设置Redis
docker pull redis

启动
docker 容器 docker运行-d –name redis1 -v C:\ Users \ xxx \ docker \
redis.conf:/etc/redis.conf -p 6379:6379 redis:latest

但是接受这个:

C:\ Program Files \ Docker \ Docker \ Resources \ bin \
docker.exe:来自守护程序的错误响应:创建安装源路径’/host_mnt/c/Users/xxx/docker/redis.conf’时出错:mkdir
/ host_mnt / c /用户/ xxx:权限被拒绝。

我的设置信息

PS C:\> docker info
Containers: 3
 Running: 1
 Paused: 0
 Stopped: 2
Images: 3
Server Version: 18.06.1-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.93-linuxkit-aufs
Operating System: Docker for Windows
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934GiB
Name: linuxkit-00155da11105
ID: KNBR:IKUS:M4JG:3XNK:FAT6:UNJI:NIFE:HWUA:2KXY:ULVW:CIUW:E4TH
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 28
 Goroutines: 51
 System Time: 2018-10-12T13:26:05.2128058Z
 EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

我已将共享权限授予我的计算机,我也是该计算机的管理员。我做错了什么?


阅读 388

收藏
2020-06-17

共1个答案

一尘不染

我发现一种解决方法是创建一个新用户帐户,该帐户的用户名与您的AzureAD帐户相同,但没有AzureAD前缀。现在工作了!
https://tomssl.com/2018/01/11/sharing-your-c-drive-with-docker-for-windows-
when-using-azure-active-directory-azuread-
aad/

2020-06-17