Jenkins wrong volume permissions

后端 未结 8 1081
迷失自我
迷失自我 2020-12-16 14:39

I have a virtual machine hosting Oracle Linux where I\'ve installed Docker and created containers using a docker-compose file. I placed the jenkins volume under a shared fol

8条回答
  •  天命终不由人
    2020-12-16 15:31

    You may be under SELinux. Running the container as privileged solved the issue for me:

    sudo docker run --privileged -p 8080:8080 -p 50000:50000 -v /data/jenkins:/var/jenkins_home jenkins/jenkins:lts

    From https://docs.docker.com/engine/reference/commandline/run/#full-container-capabilities---privileged:

    The --privileged flag gives all capabilities to the container, and it also lifts all the limitations enforced by the device cgroup controller. In other words, the container can then do almost everything that the host can do. This flag exists to allow special use-cases, like running Docker within Docker.

提交回复
热议问题