Today I have lunched a pipeline on DevOps to generate a docker image and I encountered a problem.
Dockerfile fragment:
FROM alpine:latest AS base
RUN apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib dotnet6-sdk
WORKDIR /app
EXPOSE 8080
.
.
.
I'm getting this error message when building a docker image:
#7 [build 2/11] RUN apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib dotnet6-sdk
#7 0.353 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
#7 0.514 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
#7 0.900 ERROR: unable to select packages:
#7 0.901 libssl1.1 (no such package):
#7 0.901 required by: world[libssl1.1]
#7 ERROR: process "/bin/sh -c apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib dotnet6-sdk" did not complete successfully: exit code: 1
Latest version of Alpine (3.19.0) was released on 07 Dec 2023.
If I lunch the pipeline with this modified version of dockerfile it works:
FROM alpine:3.18.5 AS base
RUN apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib dotnet6-sdk
WORKDIR /app
EXPOSE 8080
.
.
.
Probably the problem concerns the new version of Alpine which no longer uses the "libssl1.1" library.
I checked the release note and found nothing about changes or deprecation of the "libssl" library.
How do I know if the library is still needed?
How can I understand which version of the library I need to use?
I created the dockerfile taking inspiration from Microsoft documentation.
I changed libssl1.1 with libssl3 and it works with Alpine (3.19.0)