diff --git a/applications/KonSoft.AuthServer/Dockerfile b/applications/KonSoft.AuthServer/Dockerfile index ef44ab6..20ae08d 100644 --- a/applications/KonSoft.AuthServer/Dockerfile +++ b/applications/KonSoft.AuthServer/Dockerfile @@ -7,13 +7,17 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG BUILD_CONFIGURATION=Release ARG NODE_VERSION=16.13.0 ARG YARN_VERSION=1.22.15 -RUN apt-get update -yq \ - && apt-get install -yq curl gnupg \ - && curl -sL https://deb.nodesource.com/setup_16.x | bash - \ - && apt-get install -yq nodejs \ - && npm install -g yarn@${YARN_VERSION} \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +RUN echo "deb https://mirrors.huaweicloud.com/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \ + echo "deb https://mirrors.huaweicloud.com/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \ + echo "deb https://mirrors.huaweicloud.com/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \ + echo "deb https://mirrors.huaweicloud.com/debian-security bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \ + apt-get update -yq && \ + apt-get install -yq curl gnupg && \ + curl -sL https://deb.nodesource.com/setup_16.x | bash - && \ + apt-get install -yq nodejs && \ + npm install -g yarn@${YARN_VERSION} && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["NuGet.Config", "."] @@ -25,9 +29,11 @@ COPY ["shared/KonSoft.Shared.Localization/KonSoft.Shared.Localization.csproj", " RUN dotnet restore "./applications/KonSoft.AuthServer/KonSoft.AuthServer.csproj" COPY . . WORKDIR "/src/applications/KonSoft.AuthServer" -RUN dotnet tool install -g Volo.Abp.Cli \ - && export PATH="$PATH:/root/.dotnet/tools" \ - && abp install-libs +RUN dotnet nuget locals all --clear +RUN dotnet nuget add source https://mirrors.huaweicloud.com/repository/nuget/v3/index.json -n HuaweiCloud +RUN dotnet tool install -g Volo.Abp.Cli --version 8.3.4 +ENV PATH="$PATH:/root/.dotnet/tools" +RUN abp install-libs RUN dotnet build "./KonSoft.AuthServer.csproj" -c $BUILD_CONFIGURATION -o /app/build # 此阶段用于发布要复制到最终阶段的服务项目