由于权限问题,我无法在docker-compose上装载卷。
ERROR: for [container] Cannot start service [container]: oci runtime error: container_linux.go:295: starting container process caused "process_linux.go:399: container init caused \"rootfs_linux.go:57: mounting \\\"[path]\\\" to rootfs \\\"/var/lib/docker/100000.100000/overlay2/cf20e69e439cb7bfe21e805359a4b2bc48efcc7d04282d4b3e594679c6fef36a/merged\\\" at \\\"[path]\\\" caused \\\"stat [path]: permission denied\\\"\""
配置:
Ubuntu 17.10
加密磁盘Docker version 17.10.0-ce, build f4ffd25
docker-compose version 1.16.1, build 6d1ac21
Docker-compose:
container:
build:
context: ./container
volumes:
#WORK - "/tmp/:/tmp/"
#DO NOT WORK - "./container/src:/usr/src/app/src"
答案 0 :(得分:1)
好的我明白了,/home/user
文件夹没有足够的权限。
$ ls -adl /home/user/
drwx------ 36 user user 12288 nov. 8 14:19 /home/user/
使用chmod
chmod a+rwx /home/user/
chmod a+rw /var/run/docker.sock