# 封装Jenkins镜像(带有dotnet环境的) sdk=5.1 FROM jenkins/jenkins:lts USER root WORKDIR /dotnet RUN wget -O dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/820db713-c9a5-466e-b72a-16f2f5ed00e2/628aa2a75f6aa270e77f4a83b3742fb8/dotnet-sdk-5.0.100-linux-x64.tar.gz RUN tar zxf dotnet.tar.gz -C ./ RUN rm -rf dotnet.tar.gz ENV PATH="${PATH}:/dotnet:/var/jenkins_home/.dotnet/tools" ENV DOTNET_ROOT="/dotnet" RUN apt update -y RUN apt install icu-devtools vim zip unzip -y RUN usermod -a -G root jenkins USER jenkins
# 封装Jenkins镜像(带有dotnet环境的) sdk=5.1 FROM jenkins/jenkins:latest USER root WORKDIR /dotnet RUN echo "deb http://mirrors.aliyun.com/debian/ buster main non-free contrib\n\ deb http://mirrors.aliyun.com/debian-security buster/updates main\n\ deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib\n\ deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib\n\ deb-src http://mirrors.aliyun.com/debian-security buster/updates main\n\ deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib\n\ deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib\n\ deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib" > /etc/apt/sources.list RUN apt-get update --fix-missing && apt-get install -y wget --fix-missing RUN wget -O dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/820db713-c9a5-466e-b72a-16f2f5ed00e2/628aa2a75f6aa270e77f4a83b3742fb8/dotnet-sdk-5.0.100-linux-x64.tar.gz RUN tar zxf dotnet.tar.gz -C ./ RUN rm -rf dotnet.tar.gz ENV PATH="${PATH}:/dotnet:/var/jenkins_home/.dotnet/tools" ENV DOTNET_ROOT="/dotnet" RUN apt update -y RUN apt install icu-devtools vim zip unzip -y RUN usermod -a -G root jenkins USER jenkins