Skip to content

Update dockerfile to ubuntu:24.04 #3771

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 29 additions & 11 deletions images/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Source: https://github.com/dotnet/dotnet-docker
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-jammy AS build
FROM ubuntu:24.04 AS build

ARG TARGETOS
ARG TARGETARCH
ARG RUNNER_VERSION
ARG RUNNER_CONTAINER_HOOKS_VERSION=0.6.1
ARG DOCKER_VERSION=28.0.1
ARG BUILDX_VERSION=0.21.2
ARG TARGETOS=linux
ARG TARGETARCH=amd64
ARG RUNNER_VERSION=2.323.0
ARG RUNNER_CONTAINER_HOOKS_VERSION=0.6.2
ARG DOCKER_VERSION=28.0.4
ARG BUILDX_VERSION=0.22.0

RUN apt update -y && apt install curl unzip -y
RUN apt update -y \
&& apt upgrade -y \
&& apt install curl unzip -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /actions-runner
RUN export RUNNER_ARCH=${TARGETARCH} \
@@ -32,7 +35,7 @@ RUN export RUNNER_ARCH=${TARGETARCH} \
"https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-${TARGETARCH}" \
&& chmod +x /usr/local/lib/docker/cli-plugins/docker-buildx

FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-jammy
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive
ENV RUNNER_MANUALLY_TRAP_SIG=1
@@ -41,13 +44,28 @@ ENV ImageOS=ubuntu22

# 'gpg-agent' and 'software-properties-common' are needed for the 'add-apt-repository' command that follows
RUN apt update -y \
&& apt install -y --no-install-recommends sudo lsb-release gpg-agent software-properties-common curl jq unzip \
&& apt upgrade -y \
&& apt-get install -y --no-install-recommends \
curl \
gpg-agent \
libkrb5-3 \
libssl3 \
liblttng-ust1 \
libicu74 \
lsb-release \
jq \
software-properties-common \
sudo \
unzip \
zlib1g \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Configure git-core/ppa based on guidance here: https://git-scm.com/download/linux
RUN add-apt-repository ppa:git-core/ppa \
&& apt update -y \
&& apt install -y git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN adduser --disabled-password --gecos "" --uid 1001 runner \