docker: /lib64/libc.so.6: version `GLIBC_2.32‘ not found (required by docker)

这篇具有很好参考价值的文章主要介绍了docker: /lib64/libc.so.6: version `GLIBC_2.32‘ not found (required by docker)。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Linux环境 Ubuntu 22.04
docker 最新版
jenkins docker 版本(以下版本都会报错

jenkins/jenkins:centos7
jenkins/jenkins:lts-centos7
jenkins/jenkins:lts

docker-compose.yml配置

version: '3.6'
services:
  gitlab:
    image: twang2218/gitlab-ce-zh
    restart: always
    container_name: gitlab
    hostname: '192.168.2.128'
    environment:
      TZ: 'Asia/Shanghai'
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'http://192.168.2.128'
        gitlab_rails['time_zone'] = 'Asia/Shanghai'
#         需要配置到 gitlab.rb 中的配置可以在这里配置,每个配置一行,注意缩进。
#         比如下面的电子邮件的配置:
#         gitlab_rails['smtp_enable'] = true
#         gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
#         gitlab_rails['smtp_port'] = 465
#         gitlab_rails['smtp_user_name'] = "xxxx@xx.com"
#         gitlab_rails['smtp_password'] = "password"
#         gitlab_rails['smtp_authentication'] = "login"
#         gitlab_rails['smtp_enable_starttls_auto'] = true
#         gitlab_rails['smtp_tls'] = true
#         gitlab_rails['gitlab_email_from'] = 'xxxx@xx.com'
    ports:
      - '80:80'
      - '443:443'
      - '2222:22'
    volumes:
      - ./gitlab/config:/etc/gitlab
      - ./gitlab/data:/var/opt/gitlab
      - ./gitlab/logs:/var/log/gitlab
    networks:
      - CI/CD
  jenkins:
    image: jenkins/jenkins:lts  #镜像名称
    container_name: jenkins    #指定容器名
    restart: always    #在容器退出时总是重启容器
    user: root    #指定用户
    ports: #容器的端口映射到宿主机上(“:”前数字为宿主机端口,“:”后数字为容器端口)
      - "8080:8080"    #自定义宿主机端口8080
      - "5000:5000"
    environment:
      TZ: Asia/Shanghai    #指定容器运行所属时区
    volumes:
      - ./jenkins/jenkins_home:/var/jenkins_home
      - ./jenkins/home:/home    #将容器的/home目录映射到宿主机上目录中的/data/jenkins/home子目录
      - /etc/localtime:/etc/localtime
      - /var/run/docker.sock:/var/run/docker.sock    #Docker守护进程(Docker daemon)默认监听的Unix域套接字(Unix domain socket),容器中的进程可以通过它与Docker守护进程进行通信。简单来说容器使用宿主机docker命令
      - /usr/libexec/docker/cli-plugins/docker-compose:/usr/local/bin/docker-compose
      - /usr/bin/docker:/usr/bin/docker
#      - /lib/x86_64-linux-gnu/libc.so.6:/lib/x86_64-linux-gnu/libc.so.6
    networks:
      - CI/CD
networks:
  CI/CD:
    driver: bridge

报错信息

18:38:38 $ docker-compose -f /var/jenkins_home/workspace/test-springboot/docker-compose.yml up -d
18:38:38 Building test-java
18:38:38 docker: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by docker)
18:38:38 docker: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by docker)
18:38:38 Service 'test-java' failed to build : Build failed
18:38:38 Build step 'Docker Compose Build Step' changed build result to FAILURE
18:38:38 ERROR: Failed to parse POMs
18:38:38 java.io.EOFException: unexpected stream termination
18:38:38 	at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:459)
18:38:38 	at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:404)
18:38:38 	at hudson.slaves.Channels.forProcess(Channels.java:121)
18:38:38 	at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:298)
18:38:38 	at hudson.maven.ProcessCache.get(ProcessCache.java:237)
18:38:38 	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:802)
18:38:38 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
18:38:38 	at hudson.model.Run.execute(Run.java:1895)
18:38:38 	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
18:38:38 	at hudson.model.ResourceController.execute(ResourceController.java:101)
18:38:38 	at hudson.model.Executor.run(Executor.java:442)
18:38:38 Finished: FAILURE

解决方法:

替换 jenkins  docker版本

改为 jenkins/jenkins:jdk11

原因

可能是因为报错的底层镜像用的都是centos,与ubuntu22.04不兼容,
docker: /lib64/libc.so.6: version `GLIBC_2.32‘ not found (required by docker),docker,容器,运维

ubuntu22.04应该使用jenkins/jenkins:jdk11 ,他的From镜像是eclipse-temurin:“${JAVA_VERSION}”-jdk-focal,
docker: /lib64/libc.so.6: version `GLIBC_2.32‘ not found (required by docker),docker,容器,运维

然后在上级的From镜像应该是ubuntu:20.04,所有才能兼容使用
docker: /lib64/libc.so.6: version `GLIBC_2.32‘ not found (required by docker),docker,容器,运维文章来源地址https://www.toymoban.com/news/detail-715639.html

代码示例

https://gitee.com/xiaoyun461/git-lab-docker.git

到了这里,关于docker: /lib64/libc.so.6: version `GLIBC_2.32‘ not found (required by docker)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包