Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipelines agent on alpine reporting error relocating ./bin/libcoreclr.so #2931

Closed
ArthwitRail opened this issue Apr 19, 2020 · 16 comments
Closed

Comments

@ArthwitRail
Copy link

ArthwitRail commented Apr 19, 2020

Agent Version and Platform

2.166.3 - Alpine Linux 3.11.5 (x86-64)

What's not working?

trying to get Alpine to run the azure pipelines agent 2.166.3, i have installed and configured many agents before on RH7 and Windows without issues.

I have downloaded the agent and tried running config.sh but it is outputting

fubar:~/myagent$ ./config.sh Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by ./bin/libcoreclr.so) Error relocating ./bin/libcoreclr.so: __finite: symbol not found Error relocating ./bin/libcoreclr.so: __isnan: symbol not found Error relocating ./bin/libcoreclr.so: __finitef: symbol not found Error relocating ./bin/libcoreclr.so: __isnanf: symbol not found Error relocating ./bin/libcoreclr.so: pthread_attr_setaffinity_np: symbol not found Error relocating ./bin/System.Net.Http.Native.so: __strdup: symbol not found libicu's dependencies missing for .NET Core 3.1 Execute ./bin/installdependencies.sh to install any missing dependencies. fubar:~/myagent$

appreciate that alpine is a musl based distro and i believe i have satisfied all the dependencies listed when the dotnet-install.sh script runs and outputs the missing dependency warnings.

the musl lib and gcc are working fine as i have ported my application to Alpine i just need to add it into my build pipe as a target but cat get the agent running to do that.

first question is should i be able to run the agent on alpine ?

more info on config below - happy to supply anything else required.

fubar:~/myagent$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.201
Commit: b1768b4ae7

Runtime Environment:
OS Name: alpine
OS Version: 3.11
OS Platform: Linux
RID: alpine.3.11-x64
Base Path: /home/dotnet/sdk/3.1.201/

Host (useful for support):
Version: 3.1.3
Commit: 4a9f85e9f8

.NET Core SDKs installed:
3.1.201 [/home/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.3 [/home/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.3 [/home/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
fubar:~/myagent$ uname -a
Linux fubar 5.4.27-0-lts #1-Alpine SMP Mon, 23 Mar 2020 18:15:20 UTC x86_64 Linux

fubar:~/myagent$ apk list | grep icu
icu-dev-64.2-r1 x86_64 {icu} (MIT ICU Unicode-TOU)
icu-libs-64.2-r1 x86_64 {icu} (MIT ICU Unicode-TOU) [installed]
py3-icu-2.3.1-r2 x86_64 {py3-icu} (MIT)
icu-static-64.2-r1 x86_64 {icu} (MIT ICU Unicode-TOU)
icu-64.2-r1 x86_64 {icu} (MIT ICU Unicode-TOU) [installed]
harfbuzz-icu-2.6.4-r0 x86_64 {harfbuzz} (MIT)
icu-doc-64.2-r1 x86_64 {icu} (MIT ICU Unicode-TOU)

@chenfli
Copy link

chenfli commented Sep 17, 2020

Do you have the Dockerfile available, so I can debug it ?

@ArthwitRail
Copy link
Author

No docker involved - this is a real alpine vm running in VSphere, i thought i had loaded all the pre-req but i cant seem to get the agent to start. TBH i havent tried it for a while as i worked round it by putting an agent on an RH7 linux VM azure and scp'ing the checkout made by the agent to the remote Alpine system and running my build using ssh, then pulling back the artifacts for publishing into the rest of my build pipe.

I would rather run the agent on Alpine.

@masonhuemmer
Copy link

Having similar issue.

@maqsood81
Copy link

Here is the docker file i have same issue -

Dockerfile.txt

@tbongiovani
Copy link

I have same problen

my dockerfile

FROM docker:dind

RUN apk update

RUN apk upgrade

RUN apk add --no-cache bash

RUN apk --no-cache add curl

RUN apk --no-cache add wget

RUN apk --no-cache add jq

RUN apk --no-cache add git

RUN apk --no-cache add gnupg

RUN apk --no-cache add gdb

RUN apk --no-cache add icu-libs

RUN apk --no-cache add openssl

RUN apk --no-cache add jq

RUN apk --no-cache add libcurl

RUN apk --no-cache add libunwind

RUN apk --no-cache add netcat-openbsd

RUN apk --no-cache add sudo

RUN apk --no-cache add btrfs-progs

RUN apk --no-cache add ca-certificates

RUN apk --no-cache add e2fsprogs

RUN apk --no-cache add e2fsprogs-extra

RUN apk --no-cache add libgcc

RUN apk --no-cache add libstdc++

RUN apk --no-cache add gcompat libc6-compat

RUN apk --no-cache add netcat-openbsd

RUN apk --no-cache add shadow-uidmap

RUN apk --no-cache add xfsprogs

RUN apk --no-cache add xz

RUN apk --no-cache add krb5-libs

RUN apk --no-cache add libintl

RUN apk --no-cache add libssl1.1

RUN apk --no-cache add zlib

ENV DOTNET_INSTALL_SKIP_PREREQS=1

RUN mkdir azp

WORKDIR /azp

RUN curl -LsS https://download.visualstudio.microsoft.com/download/pr/91571c5a-2e55-4187-8774-bbbab205fac6/4d53331ec2beb5c648202cae23643686/dotnet-sdk-3.1.405-linux-musl-x64.tar.gz --output dotnet-sdk-3.1.405-linux-musl-x64.tar.gz

RUN mkdir -p dotnet

RUN ls

RUN tar zxf dotnet-sdk-3.1.405-linux-musl-x64.tar.gz -C dotnet

ENV DOTNET_ROOT=azp/dotnet

RUN export PATH=$PATH:azp/dotnet

RUN apk add --no-cache mono --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing

RUN apk add --no-cache --virtual=.build-dependencies ca-certificates

RUN curl -LsS https://vstsagentpackage.azureedge.net/agent/2.181.0/vsts-agent-linux-x64-2.181.0.tar.gz | tar -xz & wait $!

#RUN cert-sync /etc/ssl/certs/ca-certificates.crt

#RUN apk del .build-dependencies

WORKDIR /azp

COPY ./start.sh .

RUN curl -LsS https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz | tar -xz & wait $!

RUN mv oc kubectl /usr/local/bin/

WORKDIR /azp

ENV TZ "Europe/Zurich"

ADD Ca_bjss.pem /usr/local/share/ca-certificates/Ca_bjss.pem

RUN chmod 644 /usr/local/share/ca-certificates/Ca_bjss.pem

RUN openssl x509 -in /usr/local/share/ca-certificates/Ca_bjss.pem -inform PEM -out /usr/local/share/ca-certificates/Ca_bjss.crt

#RUN update-ca-certificates

#RUN cert-sync /etc/ssl/certs/ca-certificates.crt

CMD `["./start.sh"]

error
image

@zioalex
Copy link

zioalex commented Apr 22, 2021

Same problem with Alpine 3.13.
I am trying to create a way to build Azure Pipeline agent on Azure based on Alpine using packer
I tried to install all the dependency following the docs, included the .NET ones:

# SW Pre-reqs 
apk add openssl sudo shadow parted e2fsprogs iptables sfdisk
apk add python3 py3-setuptools
apk add curl unzip e2fsprogs-extra
apk add icu-libs krb5-libs libgcc libint libstdc++ zlib gcompat
apk add libintl libssl1.1
# .NET Requirements
apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib
apk add libgdiplus --repository https://dl-3.alpinelinux.org/alpine/edge/testing/

When I try to run ./config.sh --help I get:
image

Any update here?

@SymbioticKilla
Copy link

Is there any ETA? Thanks!

@anatolybolshakov
Copy link
Contributor

Hi @SymbioticKilla is it still reproducible for you with latest agent version?

@SymbioticKilla
Copy link

Hi @anatolybolshakov,

sorry, was just curios if it is on the road map. I'm waiting for official support. Due to compliance rules in our company unfortunately I can't test unofficial stuff.

@EzzhevNikita
Copy link
Contributor

@SymbioticKilla Support of Alpine will require a separate build of our Agent (linux-musl-x64). As I know we don't have plans for official support of Alpine, so the support of this OS won't appear in the nearest future.

@dkadetov
Copy link

dkadetov commented Sep 2, 2021

I was trying to use alpine-glibc image. But I had the same issue.

@Socolin
Copy link

Socolin commented Jan 19, 2022

I have the same issue

@github-actions
Copy link

This issue has had no activity in 180 days. Please comment if it is not actually stale

@SymbioticKilla
Copy link

No Plan to support alpine?

@towerbe
Copy link

towerbe commented Aug 16, 2022

Can we reopen this issue? There is full support for .NET Core - at least 3.1 - for Alpine now. Not being able to use Alpine for containerized agents forces us to have huge, bloated containers due to use of other less streamlined OS images.

Related story is #1319

@KarenTazayan
Copy link

Hi everyone,

Any news about this topic?

I really need it to run official docker:dind images as build agents in Azure Pipelines. Especially when .NET 6 is officially supported on Alpine.

clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
clemlesne added a commit to clemlesne/blue-agent that referenced this issue Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests