我正在尝试在运行 Ubuntu 22.04 的 EC2 实例上使用 docker-in-docker 将 Jenkins 配置为 docker 容器,但当我尝试运行包含 docker 命令的脚本时,找不到“GLIBC_2.32”和“GLIBC_2.34” Jenkins 中的 docker 插件。我已关注this https://www.tiuweehan.com/blog/2020-09-10-docker-in-jenkins-in-docker/作为在我的本地主机上设置 Jenkins 的参考。当移动到远程时,我收到这些错误
...
$ docker login -u username -p ******** https://registry.gitlab.com
docker: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by docker)
docker: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by docker)
...
这是 docker-compose.yaml 文件
version: '3.3'
services:
docker-in-docker-container:
image: docker:dind
container_name: docker-in-docker-container
user: root
privileged: true
expose:
- 2375
volumes:
- ./data:/var/jenkins_home
environment:
DOCKER_TLS_CERTDIR: ""
restart: on-failure
jenkins-container:
image: jenkins/jenkins:lts-jdk17
container_name: jenkins-container
user: root
depends_on:
- docker-in-docker-container
ports:
- '8080:8080'
privileged: true
volumes:
- ./data:/var/jenkins_home
- /usr/bin/docker:/usr/bin/docker
environment:
DOCKER_HOST: tcp://docker-in-docker-container:2375
restart: on-failure
我尝试使用 Jenkins docker 存储库中的各种映像,例如 alpine、jdk8、jdk11 和 jdk17,但没有成功。
这是用于从主机进行故障排除的 ldd 信息
ubuntu@ip-10-0-0-251:~$ ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3) 2.35
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
这是 Jenkins 容器的 ldd 信息
root@a2da70fc6100:/# ldd --version
ldd (Debian GLIBC 2.31-13+deb11u3) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
期待任何帮助!谢谢。