runner icon indicating copy to clipboard operation
runner copied to clipboard

Update dockerfile to ubuntu:24.04

Open joshua-clayton opened this issue 8 months ago • 1 comments

The Dockerfile has gotten pretty stale, and as a base for build images, leaves a lot of CVEs and vulnerabilities which are easily fixed by moving to a more recent base.

Update it to the most recent Ubuntu LTS.

I'm not sure if there is a more recent version of the dotnet image, but it seemed simpler to me to follow the installation instructions for action-runner in the Dockerfile.

Lastly, I added apt-get upgrade to the beginning of each apt command, which will keep the image up to date with the source image if it is rebuilt, and apt-get clean to the end of each apt command, which will keep the resultant layers smaller by removing apt download cache leftovers

joshua-clayton avatar Mar 27 '25 18:03 joshua-clayton

Also, I don't know if your test suite will cover the Dockerfile, but I can confirm that I am using the above as a base for my self hosted runner. So its building and running with the github api. The only change I had to make to a downstream Dockerimage was to add "--break-system-packages" to the subsequent pip3 command in my local build image

joshua-clayton avatar Mar 27 '25 18:03 joshua-clayton

Thanks for this Joshua - hopefully they update it soon

gthomson31 avatar Apr 18 '25 22:04 gthomson31

While waiting for review, I'm updating the dependencies to reflect releases since march. Once this is accepted, the internal github dependencies will be kept up to date by Github's own release process, but while I'm waiting for this to be merged, I need to keep my forked copy up to date.

joshua-clayton avatar May 19 '25 17:05 joshua-clayton

@TingluoHuang I'd love to get this upgrade merged. Any objection to moving to Ubuntu 24.04?

joshua-clayton avatar May 21 '25 16:05 joshua-clayton

Is there any plans to merge ?

gthomson31 avatar Jul 21 '25 09:07 gthomson31

It's been a while. any update on this would be helpful.

rohit-dimagi avatar Aug 22 '25 14:08 rohit-dimagi

cc to watch! 💚

endersonmenezes avatar Aug 22 '25 18:08 endersonmenezes

Any update on this??

VladFCarsDevops avatar Sep 09 '25 19:09 VladFCarsDevops

Hey @joshua-clayton, I tried you suggested docker file, built it and uploaded to a my docker repo. but the runner shows: 'Waiting for docker' - for a long time. It can't communicate with the docker:dind from some reason. as far as I understand.

Did you encounter this? Maybe you can tell how to turn on better logging?

I used this yaml:

githubConfigUrl: "https://github.com/mycompany"
githubConfigSecret: github-token

runnerScaleSetName: "arc-runner-set"

controllerServiceAccount:
  namespace: arc-systems
  name: my-servoce-account-name

minRunners: 0
maxRunners: 30

runnerGroup: "default"

containerMode:
  type: "dind"

template:
  spec:
    containers:
      - name: runner
        image: my-personal-repo/actions-runner:ubuntu-24.04-v2
        imagePullPolicy: Always

oded-eid-sequentech avatar Nov 11 '25 19:11 oded-eid-sequentech