Unable to configure runner inside docker inside ubuntu:22.04 LTS container
Describe the bug
I'm trying to build my own docker image. I'm using ubuntu:22.04 as a base which looks like it should be supported.
After unpacking the tar file to /actions-runner/ and running /actions-runner/bin/installdependencies.sh, I tried to configure with:
/actions-runner/config.sh --url https://github.com/<example org> --token <token>
Which results in an error:
ldd: ./bin/libcoreclr.so: No such file or directory
ldd: ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so: No such file or directory
ldd: ./bin/libSystem.IO.Compression.Native.so: No such file or directory
--------------------------------------------------------------------------------
| ____ _ _ _ _ _ _ _ _ |
| / ___(_) |_| | | |_ _| |__ / \ ___| |_(_) ___ _ __ ___ |
| | | _| | __| |_| | | | | '_ \ / _ \ / __| __| |/ _ \| '_ \/ __| |
| | |_| | | |_| _ | |_| | |_) | / ___ \ (__| |_| | (_) | | | \__ \ |
| \____|_|\__|_| |_|\__,_|_.__/ /_/ \_\___|\__|_|\___/|_| |_|___/ |
| |
| Self-hosted runner registration |
| |
--------------------------------------------------------------------------------
# Authentication
The SSL connection could not be established, see inner exception.
To Reproduce Dockerfile:
ARG base_image=ubuntu:22.04
ARG runner_version=2.303.0
ARG architecture=x64
FROM ${base_image} AS prep
ARG runner_version
ARG architecture
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get update && apt-get install -y curl
WORKDIR /root
RUN curl -OL https://github.com/actions/runner/releases/download/v${runner_version}/actions-runner-linux-${architecture}-${runner_version}.tar.gz
FROM ${base_image} as final
ARG runner_version
ARG architecture
# Add the user and base directories
RUN mkdir /actions-runner /actions-home && \
useradd --system --home /actions-home github-build
# Extract the tar file that we downloaded from github
RUN --mount=type=bind,from=prep,source=/root/,target=/root \
cd /actions-runner && \
tar xzf /root/actions-runner-linux-${architecture}-${runner_version}.tar.gz && \
chown -R github-build:github-build /actions-runner /actions-home
# Install required dependences. Use provided script
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get update && \
/actions-runner/bin/installdependencies.sh && \
rm -rf /var/lib/apt/lists/*
Then run a container and try to configure with /actions-runner/config.sh
Expected behavior The docker file above should have enough dependencies installed to run an be fully functional, ready to configure.
There seems to be some mismatch in file naming between the packaged libraries and requirements on the runner. There is a discussion of this here: https://stackoverflow.com/a/65873267/453851 and a workaround here https://stackoverflow.com/a/65910123/453851
The problem is related to the .NET dependency. The GitHub runner uses the 3.x version while the latest (and what I had installed) is 5. In the newer version, those libraries are renamed without the preceding "lib". More details on that here
The dependencies also miss ca-certificates in order to complete the SSL handshake with Github. I guess this could be left as an exercise for the reader if developers feel adding it is a security risk. But if so, could this please be added to the documentation.
Runner Version and Platform
Version of your runner? 2.303.0
OS of the machine running the runner? Linux Ubuntu 22.04
What's not working?
config.sh won't connect to github.
I hit the same ldd: errors and was able to work around them by cding into the directory instead, e.g.:
cd /actions-runner
./config.sh --url https://github.com/<example org> --token <token>
This smells related to #2373 and #945
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.