changed up
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m14s
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m14s
This commit is contained in:
parent
241e2ac6cf
commit
a45bc4e6cb
37
Dockerfile
37
Dockerfile
@ -3,20 +3,28 @@ FROM docker.io/gitea/act_runner:latest
|
|||||||
# Switch to root to install packages
|
# Switch to root to install packages
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
# Update package lists and install prerequisites
|
# Update Alpine packages and install prerequisites
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apk update && apk add --no-cache \
|
||||||
wget \
|
wget \
|
||||||
apt-transport-https \
|
curl \
|
||||||
software-properties-common \
|
bash \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
icu-libs \
|
||||||
|
ca-certificates \
|
||||||
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Add Microsoft package repository and install .NET SDK
|
# 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 \
|
# Microsoft doesn’t publish Alpine .NET SDK packages in apt repos,
|
||||||
&& dpkg -i packages-microsoft-prod.deb \
|
# so you need to install the official tarball instead
|
||||||
&& rm packages-microsoft-prod.deb \
|
RUN wget https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.305/dotnet-sdk-9.0.305-linux-musl-x64.tar.gz \
|
||||||
&& apt-get update \
|
-O dotnet-sdk.tar.gz \
|
||||||
&& apt-get install -y dotnet-sdk-9.0 \
|
&& mkdir -p /usr/share/dotnet \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& 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
|
# Verify .NET installation
|
||||||
RUN dotnet --version
|
RUN dotnet --version
|
||||||
@ -25,9 +33,8 @@ RUN dotnet --version
|
|||||||
# Check what user the base image uses
|
# Check what user the base image uses
|
||||||
RUN id
|
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
|
# Keep the original entrypoint from act_runner
|
||||||
# The base image will handle the act_runner functionality
|
# The base image will handle the act_runner functionality
|
||||||
|
|
||||||
|
# Switch back to the original user
|
||||||
|
USER runner
|
||||||
Loading…
Reference in New Issue
Block a user