dotnet coverage (test) raises No usable version of libssl was found

I have a solution which contains one .NET Core 3.1 project, and some .NET 6 and 8 projects.
I need an universal docker image containing .NET SDK (3.1, 6, 8) to run dotnet coverage with dotnet test inside. So, I made the image:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code># Use .NET 8 SDK
FROM nx-docker-microsoft-proxy.alfastrah.ru/dotnet/sdk:8.0
# Some installs & upgrades
RUN apt-get update
&& apt-get install -y ca-certificates openssl
&& rm -rf /var/lib/apt/lists/*
#.NET SDKs 3.1 Core & 6
RUN wget --no-check-certificate https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh
&& chmod +x dotnet-install.sh
&& ./dotnet-install.sh --channel 3.1 --install-dir /usr/share/dotnet
&& ./dotnet-install.sh --channel 6.0 --install-dir /usr/share/dotnet
&& rm dotnet-install.sh
</code>
<code># Use .NET 8 SDK FROM nx-docker-microsoft-proxy.alfastrah.ru/dotnet/sdk:8.0 # Some installs & upgrades RUN apt-get update && apt-get install -y ca-certificates openssl && rm -rf /var/lib/apt/lists/* #.NET SDKs 3.1 Core & 6 RUN wget --no-check-certificate https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh && chmod +x dotnet-install.sh && ./dotnet-install.sh --channel 3.1 --install-dir /usr/share/dotnet && ./dotnet-install.sh --channel 6.0 --install-dir /usr/share/dotnet && rm dotnet-install.sh </code>
# Use .NET 8 SDK
FROM nx-docker-microsoft-proxy.alfastrah.ru/dotnet/sdk:8.0

# Some installs & upgrades
RUN apt-get update 
    && apt-get install -y ca-certificates openssl 
    && rm -rf /var/lib/apt/lists/*

#.NET SDKs 3.1 Core & 6
RUN wget --no-check-certificate https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh 
    && chmod +x dotnet-install.sh 
    && ./dotnet-install.sh --channel 3.1 --install-dir /usr/share/dotnet 
    && ./dotnet-install.sh --channel 6.0 --install-dir /usr/share/dotnet 
    && rm dotnet-install.sh

The Gitlab CI job which runs coverage & tests:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>test-dotnet:
#...
artifacts:
paths:
- $DOTNET_COVERAGE_REPORT_PATH
script:
- apt-get update
- apt-get install libxml2
- dotnet nuget disable source nuget.org
- dotnet tool install dotnet-coverage --global --version 17.9.6 --add-source $MY_NUGET_SRC --ignore-failed-sources
- export PATH="$PATH:$HOME/.dotnet/tools"
- export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
- dotnet build --source $MY_NUGET_SRC -c $DOTNET_CONFIG -m:1
- dotnet-coverage collect "dotnet test --no-build --no-restore -c $DOTNET_CONFIG -m:1" -f xml -o $DOTNET_COVERAGE_REPORT_PATH
</code>
<code>test-dotnet: #... artifacts: paths: - $DOTNET_COVERAGE_REPORT_PATH script: - apt-get update - apt-get install libxml2 - dotnet nuget disable source nuget.org - dotnet tool install dotnet-coverage --global --version 17.9.6 --add-source $MY_NUGET_SRC --ignore-failed-sources - export PATH="$PATH:$HOME/.dotnet/tools" - export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 - dotnet build --source $MY_NUGET_SRC -c $DOTNET_CONFIG -m:1 - dotnet-coverage collect "dotnet test --no-build --no-restore -c $DOTNET_CONFIG -m:1" -f xml -o $DOTNET_COVERAGE_REPORT_PATH </code>
test-dotnet:
  #...
  artifacts:    
    paths:
      - $DOTNET_COVERAGE_REPORT_PATH
  script:
    - apt-get update
    - apt-get install libxml2
    - dotnet nuget disable source nuget.org    
    - dotnet tool install dotnet-coverage --global --version 17.9.6 --add-source $MY_NUGET_SRC --ignore-failed-sources
    - export PATH="$PATH:$HOME/.dotnet/tools"
    - export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
    - dotnet build --source $MY_NUGET_SRC -c $DOTNET_CONFIG -m:1
    - dotnet-coverage collect "dotnet test --no-build --no-restore -c $DOTNET_CONFIG -m:1" -f xml -o $DOTNET_COVERAGE_REPORT_PATH

So, during this job I receive an error:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>$ dotnet-coverage collect "dotnet test --no-build --no-restore -c $DOTNET_CONFIG -m:1" -f xml -o $DOTNET_COVERAGE_REPORT_PATH
Microsoft (R) Code Coverage Command Line Tool (x64)
Copyright (c) Microsoft Corporation. All rights reserved.
SessionId: a2a47082-1ee3-4ca0-8437-1728917246eb
No usable version of libssl was found
/usr/bin/bash: line 195: 340 Aborted (core dumped) dotnet-coverage collect "dotnet test --no-build --no-restore -c $DOTNET_CONFIG -m:1" -f xml -o $DOTNET_COVERAGE_REPORT_PATH
Cleaning up file based variables
ERROR: Job failed: command terminated with exit code 1
</code>
<code>$ dotnet-coverage collect "dotnet test --no-build --no-restore -c $DOTNET_CONFIG -m:1" -f xml -o $DOTNET_COVERAGE_REPORT_PATH Microsoft (R) Code Coverage Command Line Tool (x64) Copyright (c) Microsoft Corporation. All rights reserved. SessionId: a2a47082-1ee3-4ca0-8437-1728917246eb No usable version of libssl was found /usr/bin/bash: line 195: 340 Aborted (core dumped) dotnet-coverage collect "dotnet test --no-build --no-restore -c $DOTNET_CONFIG -m:1" -f xml -o $DOTNET_COVERAGE_REPORT_PATH Cleaning up file based variables ERROR: Job failed: command terminated with exit code 1 </code>
$ dotnet-coverage collect "dotnet test --no-build --no-restore -c $DOTNET_CONFIG -m:1" -f xml -o $DOTNET_COVERAGE_REPORT_PATH
Microsoft (R) Code Coverage Command Line Tool (x64)
Copyright (c) Microsoft Corporation. All rights reserved.
SessionId: a2a47082-1ee3-4ca0-8437-1728917246eb
No usable version of libssl was found
/usr/bin/bash: line 195:   340 Aborted                 (core dumped) dotnet-coverage collect "dotnet test --no-build --no-restore -c $DOTNET_CONFIG -m:1" -f xml -o $DOTNET_COVERAGE_REPORT_PATH
Cleaning up file based variables
ERROR: Job failed: command terminated with exit code 1

also I tried to install libssl_dev like adviced in the web. The same result.
How can i solve this error?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật