Ask Your Question
2

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

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

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: 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
edit retag flag offensive close merge delete

Comments

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 -0600 )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 -0600 )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 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

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

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

Comments

remember to set back to setenforce 1 though :).

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

Question Tools

1 follower

Stats

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

Seen: 3,227 times

Last updated: Jul 23 '14