docker - alpine:3.14 docker libtls.so.20 冲突
问题描述
所以我在使用来自 alpine 的最新 docker build 时遇到了错误。alpine:3.14.0 大约在一天前发布,并试图安装 libressl 和 libressl-dev,但似乎都失败并出现以下错误。我目前的工作是使用 alpine:3.12.0 构建,因为 3.12.0 似乎没有安装 libretls。虽然我想知道如何解决这个问题。我试图删除 libretls,但没有奏效(下面也有错误)。谢谢
$ docker -v
Docker version 20.10.6, build 370c289
$ docker run --rm -it alpine /bin/ash
/ # apk add libressl-dev
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/5) Installing libressl3.3-libcrypto (3.3.3-r0)
(2/5) Installing libressl3.3-libssl (3.3.3-r0)
(3/5) Installing libressl3.3-libtls (3.3.3-r0)
ERROR: libressl3.3-libtls-3.3.3-r0: trying to overwrite usr/lib/libtls.so.20 owned by libretls-3.3.3-r0.
ERROR: libressl3.3-libtls-3.3.3-r0: trying to overwrite usr/lib/libtls.so.20.0.3 owned by libretls-3.3.3-r0.
(4/5) Installing pkgconf (1.7.4-r0)
(5/5) Installing libressl-dev (3.3.3-r0)
Executing busybox-1.33.1-r2.trigger
1 error; 41 MiB in 19 packages
/ #
/ # apk info libretls
libretls-3.3.3-r0 description:
port of libtls from libressl to openssl
libretls-3.3.3-r0 webpage:
https://git.causal.agency/libretls/
libretls-3.3.3-r0 installed size:
84 KiB
/ #
/ # apk del libretls
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/main: No such file or directory
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/community: No such file or directory
World updated, but the following packages are not removed due to:
libretls: busybox alpine-baselayout apk-tools
OK: 6 MiB in 14 packages
/ # exit
解决方案
这是上游问题。暂时降级到 alpine 3.13 直到问题得到解决。通常 docker 图像支持固定的高山版本(感谢 MrGlass 评论)。例如
python:3-alpine -> python:3-alpine3.13
php:7.4-fpm-alpine -> php:7.4-fpm-alpine3.13
推荐阅读
- javascript - 根据财政年度对象排序对象
- python - Json Schema 中 UTF-8 的模式是什么?
- python - 如何在熊猫数据框中创建新的总计(sumif)列?
- r - 如何从不对称列表中创建数据框并设置名称
- javascript - 使用vue点击更改背景颜色
- python - 如何浏览 Python 库 API 文档
- python - 将熊猫数据框列拆分为新的 4 列
- python-3.x - 如何将参数和标头传递给 aiohttp ClientSession
- windows - PowerShell 检查服务是否被禁用
- flutter - flutter中如何使用sip_ua?导致50个错误