Unable to configure runner inside docker inside ubuntu:22.04 LTS container
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Dockerfile, /actions-runner/bin/installdependencies.sh, and /actions-runner/config.sh, then compare them with the supported distributions documentation. Reproduce the configuration failure in an ubuntu:22.04 container and investigate the missing libraries and certificate dependency. Done means the documented dependencies are sufficient for config.sh to establish its SSL connection to GitHub.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, docker, ubuntu
- Domain
- ci-cd, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100