gpt4 book ai didi

docker - 卷装载时拒绝Docker权限

转载 作者:行者123 更新时间:2023-12-02 20:10:01 26 4
gpt4 key购买 nike

由于权限问题,我无法在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组成:
    container:
    build:
    context: ./container
    volumes:
    #WORK - "/tmp/:/tmp/"
    #DO NOT WORK - "./container/src:/usr/src/app/src"

    最佳答案

    好的,我知道了,/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

    关于docker - 卷装载时拒绝Docker权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47177531/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com