Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
libapparmor.so.1: cannot open shared object file: No such file or directory #17
Comments
cdancy
commented
Oct 14, 2014
|
Have the same issue, using the same container, trying to pass the docker binary to the container. Have you found a workaround? |
cdancy
commented
Oct 14, 2014
|
I can confirm that testing under CentOS 7 (as host machine with ubuntu 14.04 as container) I get a similar issue though it's 'libdevmapper.so.1.02' that can't be loaded. |
clzhao
commented
Jul 16, 2015
|
@cdancy |
cdancy
commented
Jul 16, 2015
|
@carlye566 no longer using centos7. Switched to arch linux, which is always updating to the latest version of docker, and have never seen this problem. I use RedHat7 at work, which should loosely mirror centos7, and I don't see the issue there either. |
clzhao
commented
Jul 16, 2015
|
@cdancy OK. Thank you all the same! |
tomfotherby
commented
Jul 27, 2015
|
I get this problem with Ubuntu 15.04 and docker v1.7.1 since I changed getting docker from the I can reproduce it using this command:
(This runs a |
tomfotherby
commented
Jul 27, 2015
|
I found a workaround (but the fix is specific to Ubuntu 15.04). I can get my docker commands working if I bind-mount the missing library using
(The host location of the |
cuongtransc
commented
Aug 7, 2015
|
If you are using ubuntu 14.04, I need mount
|
ryuheechul
commented
Aug 10, 2015
|
this volume mounting below worked with me on ubuntu host.
|
rocktavious
commented
Aug 27, 2015
|
The above volume mounting worked for me too on ubuntu 14.04 with docker 1.8.1 |
jverdeyen
commented
Sep 10, 2015
|
|
chrisskilton
commented
Sep 11, 2015
|
Just hit this in docker (1.8.2) running on Debian (wheezy). Running: yields:
Even with the volume mount the error still occurs. Will there be a fix for this or is it going to be handled with a workaround? Any ideas why the workaround isn't working for me? Note: I don't seem to hit this problem from OSX (via boot2docker) |
ghost
commented
Sep 11, 2015
|
try install lxc |
rayrutjes
referenced this issue
in rayrutjes/simple-gitlab-runner
Oct 12, 2015
Closed
Add libapparmor1 and clean up after apt #1
michaeljs1990
commented
Oct 26, 2015
|
For anyone else who runs into this installing lxc on your box will fix this. |
arpheno
commented
Nov 2, 2015
|
i just tried to fix this by running |
michaeljs1990
commented
Nov 2, 2015
|
@arpheno did you install on the machine running the docker daemon or on the actual container? |
MichaelMackus
commented
Nov 5, 2015
|
I just did an This run command is working for me:
Would be nice to have this working without the (ugly) libapparmor mount, but it works! |
michaeljs1990
commented
Nov 5, 2015
|
@MichaelMackus just install lxc on the actual docker container. |
MichaelMackus
commented
Nov 5, 2015
|
Doh! Thanks @michaeljs1990 that worked :) |
ghostsquad
commented
Dec 2, 2015
|
fix for centos7: include |
This was referenced Dec 14, 2015
AlexTelon
commented
Feb 6, 2016
|
Trying to set up so a container can run docker without having docker-in-docker as proposed here. So when running:
lxc img is built with following Dockerfile
And host is running ubuntu 15.10 (ugly) solutionThe ugly way (and only that I've found now) is to add This only solves the symptom and not the problem so I tried to figure out how to get the proper lib to the container. My attempt at a nicer solutionIt seems from this that the issue might be that installing lxc through apt-get does not get a sufficiently new version of the lib. This would explain why installing lxc worked before but now now. Host > docker version
I tried to update to a newer version of lxc hoping that that would bring the correct version of the lib file with it but to no avail. (from ppa:ubuntu-lxc/daily). Maybe /stable or something would work but I gave up here. |
cdancy
commented
Feb 6, 2016
|
I don't understand why folks still try to do a docker-in-docker. There are numerous libraries, seemingly for every language, to work with dockers remote API. |
ghostsquad
commented
Feb 7, 2016
|
@cdancy I think the point is that we want to enable apps, scripts, etc to use docker without reinventing the wheel. A good example of this is a build server agent. The agent can be built from a dockerfile, and anything running inside should be able to use docker commands the way they are used natively. Docker remote api is still very cool, and enables interesting remote management solutions. I'm not trying to discredit that. |
cdancy
commented
Feb 7, 2016
|
@ghostsquad We do that very thing with Bamboo agents inside a docker container and have been very successful thus far. We've not had any situation where we needed the docker binary mounted within the container. I get that we'd like apps/scripts/etc to be able to invoke the binary as if it were available on the command line inside the container but I'm not sure that is realistic in the long run. Take for example the docker-in-docker context: how deep, and/or how many nested containers, should docker support? I'm sure you already know but you end up with situations where mapping volumes is no longer feasible without some ridiculous hacks. Because the industry is moving towards a more http oriented service model for programs, and seeing as how there is no shortage of them available for docker, IMO it seems the time would be better spent building those libraries instead of trying to make the docker-in-docker-in-docker-in-docker work. I'm not trying to take a shot at you, or anyone else in this situation, I just see this conversation come up all over the place and I think we as the greater community should start pushing folks to use the remote API instead of coming up with more and more clever hacks where docker, though never said publicly, does not appear they want to support such a thing. Didn't mean to get on a rant I just see so many great tools available, some that I developer myself, and wish more folks would jump on and support us ;) |
josephearl
commented
Feb 24, 2016
|
I believe the generic solution to this (docker-from-docker) is to install the Docker binary in the Dockerfile for your container with Or use the API client libs in your tests/code as @cdancy suggested. Although IMO for simple use cases learning a new library could be overkill. Then mount the socket but not the |
ghostsquad
commented
Feb 25, 2016
|
That makes sense On Wed, Feb 24, 2016 at 2:54 PM Joseph Earl notifications@github.com
Thanks, |
titpetric
commented
Mar 31, 2016
|
Putting this in docker arguments works for me with
Seems the culprit with DM_ issue @AlexTelon reported is in the libdevmap library. I suspect that it's because of some version mismatch between host and container, so -v solves it. |
alexejsailer
commented
Jun 3, 2016
|
On Ubuntu 14.04 this worked for me: https://gist.github.com/alexejsailer/671b18c26eb929e2c1bdf38daa23fe72 |
titpetric
commented
Jun 3, 2016
|
FYI, the recommended way to do it today is to use the jpetazzo/dind if you need a base image. Otherwise @josephearl has the correct answer. Suggesting to close this issue before I feel the need to ask why people want to forward docker.sock/docker binary to the samba docker container? :) |
kstenerud commentedSep 15, 2014
Not sure if this rates as a samba, docker, or ubuntu issue, but:
Yet apparmor does exist:
Running on Ubuntu server 14.04.