search

Home  >  Q&A  >  body text

dockerfile - jenkins容器内无法运行Docker命令

现在构建jenkins容器

docker run -d -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/usr/bin/docker -p 8080:8080 jenkins

当上面的执行后,已经成功启动容器了。

但是在Jenkins容器内运行了Docker命令,

结果失败了,出现了如下问题。

docker: error while loading shared libraries: libdevmapper.so.1.02: cannot open shared object file: No such file or directory

我试着加入了这个:

-v /lib64/libdevmapper.so.1.02:/usr/lib/libdevmapper.so.1.02

结果又出现了一个问题:

docker: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory

我想下面不用试下去了,表示无解。

PHP中文网PHP中文网2776 days ago1827

reply all(2)I'll reply

  • 迷茫

    迷茫2017-04-22 09:00:53

    Just change to root user

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-22 09:00:53

    Hello, I would like to ask, you got an error when running docker in jenkins, how did you solve it? I also encountered it
    My host machine is ubuntu 14.04
    docker: error while loading shared libraries: libltdl.so.7: cannot open share

    reply
    0
  • Cancelreply