我想安装openssl版本1。0.2g,所以我写了Dockerfile
:
RUN apt-get update
RUN apt-get install -y build-essential cmake zlib1g-dev libcppunit-dev git subversion && rm -rf /var/lib/apt/lists/*
RUN wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz -O - | tar -xz
WORKDIR /openssl_1.0.2g
RUN ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
并试图建立它:
Removing intermediate container 0666b2c5021f
---> e92f7ed1e3a0
Step 11/14 : WORKDIR /openssl_1.0.2g
Removing intermediate container c8e083d9a453
---> 112f18273e8f
Step 12/14 : RUN ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
---> Running in 4871c00e5c35
/bin/sh: 1: ./config: not found
The command '/bin/sh -c ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl' returned a non-zero code: 127
但它不起作用..
我该怎么解决?
2条答案
按热度按时间e4yzc0pl1#
您使用什么基础映像来构建映像?
使用
ubuntu:16.04
基本镜像和您提供的相同Dockerfile
时,它工作得很好:gywdnpxw2#
要在docker上安装最新版本的OPENSSL(版本3+),请执行以下操作(在ubuntu 20上测试)。Debian 10: