DotnetGiteaRunner/Dockerfile
Klas Broberg 4123ec4ef3
Some checks failed
Build and Push Docker Image / build (push) Failing after 1m55s
Initial commit
2025-09-15 13:30:18 +02:00

34 lines
1.0 KiB
Docker

FROM docker.io/gitea/act_runner:latest
# Switch to root to install packages
USER root
# Update package lists and install prerequisites
RUN apt-get update && apt-get install -y \
wget \
apt-transport-https \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*
# Add Microsoft package repository and install .NET SDK
RUN wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y dotnet-sdk-9.0 \
&& rm -rf /var/lib/apt/lists/*
# Verify .NET installation
RUN dotnet --version
# Switch back to the original user (if act_runner has a specific user)
# Check what user the base image uses
RUN id
# Set environment variables for .NET
ENV DOTNET_ROOT=/usr/share/dotnet
ENV PATH=$PATH:/usr/share/dotnet
# Keep the original entrypoint from act_runner
# The base image will handle the act_runner functionality