1. 程式人生 > >docker in docker 出現 libltdl.so.7 問題

docker in docker 出現 libltdl.so.7 問題

# docker ps -a
docker: error while loading shared libraries: libltdl.so.7: cannot open shared object file: No such file or directory

 

官方的jenkins映象是基於Debian GNU/Linux 9,使用Dockerfile重新打image

FROM docker.io/jenkins
USER root
#清除了基礎映象設定的源,切換成阿里雲源
RUN echo '' > /etc/apt/sources.list.d/jessie-backports.list \
  
&& echo "deb http://mirrors.aliyun.com/debian jessie main contrib non-free" > /etc/apt/sources.list \ && echo "deb http://mirrors.aliyun.com/debian jessie-updates main contrib non-free" >> /etc/apt/sources.list \ && echo "deb http://mirrors.aliyun.com/debian-security jessie/updates main contrib non-free
" >> /etc/apt/sources.list #更新源並安裝缺少的包 RUN apt-get update && apt-get install -y libltdl7 ARG dockerGid=999 RUN echo "docker:x:${dockerGid}:jenkins" >> /etc/group