Alpine: dependencies is missing for Dotnet Core
See original GitHub issueAzure pipelines agent (VSTS/TFS Agent) failed to start at dotnet:alpine images.
I tried different combination of alpine3.7+ image with dotnet2.1.4 or even 3.0 Each time run-time stuck because of dotnet dependencies issue:
su -c /agent/config.sh vsts-user
ldd: cannot load ./bin/libcoreclr.so: No such file or directory
ldd: cannot load ./bin/System.Security.Cryptography.Native.OpenSsl.so: No such file or directory
ldd: cannot load ./bin/System.IO.Compression.Native.so: No such file or directory
ldd: cannot load ./bin/System.Net.Http.Native.so: No such file or directory
Libicu's dependencies is missing for Dotnet Core 2.0
Execute ./bin/installdependencies.sh to install any missing Dotnet Core 2.0 dependencies.
/agent/bin/installdependencies.sh
--------OS Information--------
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.8.0
PRETTY_NAME="Alpine Linux v3.8"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
------------------------------
/agent/bin/installdependencies.sh: line 182: [: ==: unary operator expected
Can't detect current OS type base on /etc/os-release.
Can't install dotnet core dependencies.
You can manually install all required dependencies base on follwoing documentation
https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x
Dockerfile
#FROM microsoft/dotnet:2.1.4-runtime-alpine3.7
#FROM microsoft/dotnet:2.1.4-runtime-deps-alpine3.7
#FROM microsoft/dotnet:2.1.4-aspnetcore-runtime-alpine3.7
FROM microsoft/dotnet-nightly:3.0-runtime-alpine
MAINTAINER rjudin (lifeci)
#perisstent install
RUN apk update; apk --update add \
curl git \
jq icu-libs libcurl \
libunwind~=1.2 \
netcat-openbsd~=1.130 \
sudo~=1.8 bash~=4.4 \
openssl
#ca-certificates;
#temp install
RUN apk --update add --virtual build-dependencies
#temp install cleaning
RUN apk del build-dependencies; \
rm -rf /var/cache/apk/*
#ARG VSTS_AGENT_VERSION='2.131.0'
ARG VSTS_AGENT_VERSION='2.140.0'
ARG VSTS_AGENT_URL="https://vstsagentpackage.azureedge.net/agent/${VSTS_AGENT_VERSION}/vsts-agent-linux-x64-${VSTS_AGENT_VERSION}.tar.gz"
RUN echo "VSTS_AGENT_URL is $VSTS_AGENT_URL"
RUN set -x \
&& curl -fSL $VSTS_AGENT_URL -o agent.tgz \
&& mkdir agent \
&& cd agent \
&& tar -xz --no-same-owner -f ../agent.tgz \
&& cd .. \
&& rm agent.tgz
COPY ./start-vsts.sh .
RUN chmod +x start-vsts.sh
RUN adduser vsts-user; mkdir /vsts; chown -R vsts-user:root /vsts;
#USER vsts-user
RUN ls -la /vsts; whoami
CMD ["./start-vsts.sh"]
Related (closed) issues: https://github.com/Microsoft/azure-pipelines-agent/issues/1319 https://github.com/dotnet/core/issues/226
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
Install the .NET SDK or the .NET Runtime on Alpine
The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following command installs...
Read more >Missing symbols for dotnet core 3.1 (#14116) - alpine · GitLab
NET Core 3.1 Execute ./bin/installdependencies.sh to install any missing dependencies. There are multiple issues open on Github regarding this ...
Read more >Install .NET 6 runtime on clean Alpine Linux - ag
NET 6 installers or sudo, so you have to install dependencies as admin ... Executing bash-5.1.16-r0.post-install (5/13) Installing libgcc ...
Read more >How to resolve missing dependencies in Docker Alpine
At least one of the listed dependencies could not be resolved using an official package: #6 9.173 pdftk (no such package): #6 9.173...
Read more >net sdk on alpine linux - docker
.NET Core on Alpine only works in .NET Core 2.1 and later. Do you have that version? If so, did you also consider...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @vtbassmatt I am getting this error while I am using the steps here https://docs.microsoft.com/en-gb/azure/devops/pipelines/agents/docker?view=azure-devops with Alpine as base image
Any workaround to fix this ?
There is probably
#!/bin/bash
and Alpine doesn’t have that by default.