Cannot start docker container In docker CE on orac

2020-03-13 09:13发布

Recently I installed Docker CE on my Oracle Linux.
Unfortunately, when I want to start my first container with:

docker run hello-world

I get this error message:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"write /proc/self/attr/keycreate: permission denied\"": unknown. ERRO[0000] error waiting for container: context canceled

标签: docker
4条回答
姐就是有狂的资本
2楼-- · 2020-03-13 09:27

Another approach to disable se by running sudo setenforce 0. Then verify that it changed by running sestatus

查看更多
可以哭但决不认输i
3楼-- · 2020-03-13 09:35

Per the bug that david-maze linked to, updating container-selinux should fix this for you:

sudo yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm
查看更多
Evening l夕情丶
4楼-- · 2020-03-13 09:41

OP, I just ran into this issue. I am not sure what your OL support level is. But to stay supported, you really don't want to use the container-selinux from another distro. What I found as a work around is to set the following:

sudo semanage permissive -a container_runtime_t

After setting that to permissive running containers worked as expected.

查看更多
仙女界的扛把子
5楼-- · 2020-03-13 09:41

I found it. after disable selinux the problem solved. selinux prevent docker to write on /proc/self/attr/keycreat

For disable selinux:

Edit the /etc/selinux/config file to set the SELINUX parameter to disabled, and then reboot the server

查看更多
登录 后发表回答