Reputation: 6234
I have a dockerfile that uses perl:5.22 as the base image When I do:
#Dockerfile:
From perl:5.22
RUN apt-get update && apt-get install libssl1.0.0 libssl-dev
I get this error:
When I do: sudo apt-cache policy libssl1.0.0
in the dockerfile, like this:
#Dockerfile:
From perl:5.22
RUN apt-cache policy libssl1.0.0 && \
apt-cache policy libssl-dev
RUN apt-get update && apt-get install libssl1.0.0
I get:
Step 2/3 : RUN apt-cache policy libssl1.0.0 && apt-cache policy libssl-dev ---> Running in a60f0185ef5a libssl1.0.0:
Installed: (none) Candidate: (none)
Version table: libssl-dev:
Installed: 1.1.0f-3+deb9u2
Candidate: 1.1.0f-3+deb9u2
Version table:
*** 1.1.0f-3+deb9u2 500 500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages 100 /var/lib/dpkg/status 1.1.0f-3+deb9u1 500 500 http://deb.debian.org/debian stretch/main amd64 Packages
There's no available candidate to install libssl1.0.0
; I get:
E: Package 'libssl1.0.0' has no installation candidate
However there's a candidate to install the libssl-dev
package, but none for the libssl1.0.0
I'm new with docker; does the perl 5.22 base image already come with libssl1.0.0 already preinstalled in the image? I couldn't see it in their base image and secondly, *how do I install this package (libssl1.0.0)
in my dockerfile if there's no candidate available to install it*?
Lastly, since the base image already comes preinstalled with the libssl-dev could I use this package, libssl-dev
, instead of the libssl1.0.0, is there a difference between libssl-dev
and libssl1.0.0
?
Upvotes: 0
Views: 7614
Reputation: 3772
Actually, it is already installed by default.
$ docker run -it perl:5.22 /bin/bash
root@e5315bc25223:~# apt search libssl
Sorting... Done
Full Text Search... Done
libssl-dev/now 1.1.0f-3+deb9u2 amd64 [installed,local]
Secure Sockets Layer toolkit - development files
libssl1.0.0/now 1.0.1t-1+deb8u8 amd64 [installed,local]
Secure Sockets Layer toolkit - shared libraries
The perl image is based on debian:stretch, which no longer supports libssl1.0.0. You can pull the package from jessie (https://packages.debian.org/jessie/libssl1.0.0) and install with dpkg
.
Sample Dockerfile addition:
RUN wget "http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u8_amd64.deb" \
&& dpkg -i libssl1.0.0_1.0.1t-1+deb8u8_amd64.deb
Regarding the version, apt show libssl-dev
gives:
Package: libssl-dev
Version: 1.1.0f-3+deb9u2
As far as if you can use 1.1.0 instead of 1.0.0, that really depends on your software's requirements.
Upvotes: 2