-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libapparmor.so.1: cannot open shared object file: No such file or directory #17
Comments
Have the same issue, using the same container, trying to pass the docker binary to the container. Have you found a workaround? |
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. |
@cdancy |
@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. |
@cdancy OK. Thank you all the same! |
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 |
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 |
If you are using ubuntu 14.04, I need mount
|
this volume mounting below worked with me on ubuntu host.
|
The above volume mounting worked for me too on ubuntu 14.04 with docker 1.8.1 |
👍 Worked for me |
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) |
try install lxc |
For anyone else who runs into this installing lxc on your box will fix this. |
i just tried to fix this by running |
@arpheno did you install on the machine running the docker daemon or on the actual container? |
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! |
@MichaelMackus just install lxc on the actual docker container. |
Doh! Thanks @michaeljs1990 that worked :) |
fix for centos7: include |
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. |
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. |
@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. |
@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 ;) |
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 |
That makes sense On Wed, Feb 24, 2016 at 2:54 PM Joseph Earl notifications@github.com
Thanks, |
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. |
On Ubuntu 14.04 this worked for me: https://gist.github.com/alexejsailer/671b18c26eb929e2c1bdf38daa23fe72 |
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? :) |
Not sure if this rates as a samba, docker, or ubuntu issue, but:
Yet apparmor does exist:
Running on Ubuntu server 14.04.
The text was updated successfully, but these errors were encountered: