[英]apt install in Dockefile
我有一個 docker 文件,其中包含 Debian 的圖像。 由於存在漏洞,我嘗試在 dockerfile 中更改打開 ssl 的版本。 當前使用的版本 1.1.0j-1~deb9u1 我嘗試使用以下方法安裝不同的版本:
RUN apt-get install openssl=1.1.0l-1~deb9u1
但我不斷 -
Reading package lists...
Building dependency tree...
Reading state information...
E: Version '1.1.0l-1~deb9u1' for 'openssl' was not found
我應該怎么做才能安裝不同的穩定版本。
Given your selection of the package version and based on the information from the debian package repository , I assume that your debian version is stretch
. 以下dockerfile
為我工作:
FROM debian:stretch
RUN apt-get update
RUN apt-get install -y openssl=1.1.0l-1~deb9u1
在docker build -t debian-openssl.
安裝的 openssl 版本可以這樣驗證:
$ docker run -t debian-openssl openssl version
OpenSSL 1.1.0l 10 Sep 2019
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.