Can't run docker without --privileged on Fedora 20
On Fedora 20, I installed docker from the repos, then I tried to start a docker container using the command:
$ sudo docker run -i -t fedora /bin/bash
This failed with the error:
/bin/bash: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: Permission denied
If I start docker with the --privileged
flag, it works fine - the permission error probably has something to do with docker dropping kernel permissions. And this is fine for just running existing containers, but I want to use docker to build new containers using a Dockerfile, and the build
command has no --privileged
option, so all my builds fail:
$ sudo docker build --rm -t debuilder .
Sending build context to Docker daemon 2.56 kB
Sending build context to Docker daemon
Step 0 : FROM fedora
---> b9e56c8f2cf5
Step 1 : MAINTAINER Oded Arbel, "oded@geek.co.il"
---> Using cache
---> efb61429ca77
Step 2 : RUN some-command
---> Running in 0632dd005a1a
/bin/sh: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
2014/07/23 15:45:31 The command [/bin/sh -c some-command] returned a non-zero code: 127
i've disabled selinux using /etc/sysconfig/selinux and now it works. This shouldn't be an issue, but I guess i'll have to take it up with Redhat's Bugzilla. Thanks.
Yes, I've converted the comment to an answer, please take the time to mark ti as correct, or you can add an answer here of what you did and mark your answer as the correct one. This is probably a bug and we cannot handle it here. Also, it would be good to post here the bug report link (if you open one). Thank you.
Are you using btrfs on Fedora? If so, I have quite a bit of additional info to add (better done in an answer).