Giter Site home page Giter Site logo

Comments (8)

brightzheng100 avatar brightzheng100 commented on July 24, 2024 2

While running docker-in-docker, it's required to mount some missing libs from host to container if you don't want to install them explicitly into the container.

For example, below works for me while using docker compose (I think it's very easy to convert the mounts into raw docker run command)

...
volumes:
    - /var/run/docker.sock:/run/docker.sock
    - /usr/bin/docker:/usr/bin/docker
    - /sys:/sys:ro
    - /lib/x86_64-linux-gnu/libsystemd-journal.so.0:/lib/x86_64-linux-gnu/libsystemd-journal.so.0
    - /usr/lib/x86_64-linux-gnu/libapparmor.so.1:/usr/lib/x86_64-linux-gnu/libapparmor.so.1
    - /lib/x86_64-linux-gnu/libcgmanager.so.0:/lib/x86_64-linux-gnu/libcgmanager.so.0
    - /lib/x86_64-linux-gnu/libnih.so.1:/lib/x86_64-linux-gnu/libnih.so.1
    - /lib/x86_64-linux-gnu/libnih-dbus.so.1:/lib/x86_64-linux-gnu/libnih-dbus.so.1
    - /lib/x86_64-linux-gnu/libgcrypt.so.11:/lib/x86_64-linux-gnu/libgcrypt.so.11

My Env:

$ cat /proc/version
Linux version 3.16.0-30-generic (buildd@kissel) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015
$ docker -v
Docker version 1.11.0, build 4dc5990
$ docker-compose -v
docker-compose version 1.6.2, build 4d72027

Hope it helps.

from docker-containers.

cmaloney avatar cmaloney commented on July 24, 2024

Running mesos-slave in a docker isn't a particularly recommended operation (Esp. for production), a lot of mesos bits currently program in logic manually manipulating cgroups that can break in subtle ways.

As far as why the docker containerizer isn't working in your case, do you have installed and the daemon running on the host system? That command is mounting in docker from the host system and using it for launching mesos tasks.

from docker-containers.

upccup avatar upccup commented on July 24, 2024

@mymac80 Have you solved the problem? now i have the same problem, and i have no way not to resolve

from docker-containers.

tnachen avatar tnachen commented on July 24, 2024

@mymac80 it doesn't work because you don't have docker installed in your docker container, since you're just using the mesos image it doens't have docker client installed.
You should create a new image based on your mesos image but also have the docker client installed

from docker-containers.

mymac80 avatar mymac80 commented on July 24, 2024

@tnachen Thanks! Will give this a try.

from docker-containers.

PhroZenOne avatar PhroZenOne commented on July 24, 2024

@tnachen using
--privileged and -v /var/run/docker.sock:/run/docker.sock -v $(which docker):/bin/docker
seems to be the recommended way to run docker-in-docker. This usually works but for some reason it does not work here.

Seems like some other persons started getting this problem a month ago if you look at comment time stamps: https://hub.docker.com/r/mesosphere/mesos-slave/

from docker-containers.

cengiz-io avatar cengiz-io commented on July 24, 2024

Hello.

I'm bumping into same issue using mesosphere/mesos-slave:0.28.1 with docker 1.11.1 on 4.5.4-1-ARCH kernel.

Problem seems to be libsystemd.so.0 when I type docker inside container image.

root@b127c72e50a5:/# docker
docker: error while loading shared libraries: libsystemd.so.0: cannot open shared object file: No such file or directory

Trusting the cat /etc/issue output, mesosphere/mesos-slave:0.28.1 seems to be based on Ubuntu 14.04.4 LTS

Here are the missing links for docker binary which I mounted from my host into /bin of container

root@b127c72e50a5:/# ldd /bin/docker
    linux-vdso.so.1 =>  (0x00007ffce3935000)
    libsystemd.so.0 => not found
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f514bf6e000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f514bd69000)
    libdevmapper.so.1.02 => not found
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f514b9a4000)
    /lib64/ld-linux-x86-64.so.2 (0x000055bd1ddee000)

Maybe this will help a bit

Thanks

from docker-containers.

asridharan avatar asridharan commented on July 24, 2024

I think the problem here seems to be that bind mounting the docker.sock is not enough, you need to bind mount the docker client binary as well. However this is fraught with errors since latest versions of docker client are not purely static go binaries, and have dependencies on other shared objects.

The right solution (discussed and proposed by @jieyu ) seems to be to build the Mesos docker containers using the docker in docker build file , but replacing the base image with Ubuntu 14.04 instead of Alpine linux. The resulting image should have the docker client packaged correctly with the Mesos binaries. The Mesos docker container should be able to launch docker containers using the host docker daemon.

from docker-containers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.