Ask Your Question

Can't run docker without --privileged on Fedora 20

asked 2014-07-23 07:52:02 -0500

guss77 gravatar image

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: 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, ""
 ---> Using cache
 ---> efb61429ca77
Step 2 : RUN some-command
 ---> Running in 0632dd005a1a
/bin/sh: error while loading shared libraries: 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
edit retag flag offensive close merge delete


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.

guss77 gravatar imageguss77 ( 2014-07-24 02:01:36 -0500 )edit

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.

NickTux gravatar imageNickTux ( 2014-07-24 02:28:51 -0500 )edit

Are you using btrfs on Fedora? If so, I have quite a bit of additional info to add (better done in an answer).

dfarrell07 gravatar imagedfarrell07 ( 2014-09-09 12:59:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-23 14:14:17 -0500

NickTux gravatar image

Please check the comments at this bug report, probably you have a similar problem. Try to # setenforce 0 and see if the problem persists.

edit flag offensive delete link more


remember to set back to setenforce 1 though :).

abadrinath gravatar imageabadrinath ( 2014-07-26 00:55:21 -0500 )edit

Question Tools

1 follower


Asked: 2014-07-23 07:52:02 -0500

Seen: 3,236 times

Last updated: Jul 23 '14