DotnetGiteaRunner/Dockerfile
Klas Broberg 338f87f12a
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m59s
Change back to root
2025-09-15 14:15:20 +02:00

33 lines
944 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM docker.io/gitea/act_runner:latest
# Switch to root to install packages
USER root
# Update Alpine packages and install prerequisites
RUN apk update && apk add --no-cache \
wget \
curl \
bash \
icu-libs \
ca-certificates \
&& rm -rf /var/cache/apk/*
# Add Microsoft package repository and install .NET SDK
# Microsoft doesnt publish Alpine .NET SDK packages in apt repos,
# so you need to install the official tarball instead
RUN wget https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.305/dotnet-sdk-9.0.305-linux-musl-x64.tar.gz \
-O dotnet-sdk.tar.gz \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf dotnet-sdk.tar.gz -C /usr/share/dotnet \
&& rm dotnet-sdk.tar.gz
# Set environment variables for .NET before verifying installation
ENV DOTNET_ROOT=/usr/share/dotnet
ENV PATH=$PATH:/usr/share/dotnet
# Verify .NET installation
RUN dotnet --version
# Check what user the base image uses
RUN id