diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/Dockerfile b/Yi.Abp.Net8/src/Yi.Abp.Web/Dockerfile index 91301637..21592fb0 100644 --- a/Yi.Abp.Net8/src/Yi.Abp.Web/Dockerfile +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/Dockerfile @@ -8,6 +8,8 @@ EXPOSE 8080 FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src + +COPY ./common.props ./ COPY ["src/Yi.Abp.Web/Yi.Abp.Web.csproj", "src/Yi.Abp.Web/"] COPY ["framework/Yi.Framework.AspNetCore.Authentication.OAuth/Yi.Framework.AspNetCore.Authentication.OAuth.csproj", "framework/Yi.Framework.AspNetCore.Authentication.OAuth/"] COPY ["framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.csproj", "framework/Yi.Framework.AspNetCore/"] diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/README-DOCKER-BUILD.md b/Yi.Abp.Net8/src/Yi.Abp.Web/README-DOCKER-BUILD.md new file mode 100644 index 00000000..aba1e37f --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/README-DOCKER-BUILD.md @@ -0,0 +1,22 @@ +# Docker 构建说明 + +## 执行命令 + +```shell +# 在Yi.Abp.Net8 目录下执行 +docker build -t xxx-xxx:${BUILD_NUMBER} -f ./src/Yi.Abp.Web/Dockerfile . + +``` + +## 注意 + +NuGet 源国内访问有时候会报错,可以考虑切换成华为源,加上参数 + +```shell +RUN dotnet restore --source https://repo.huaweicloud.com/repository/nuget/v3/index.json "./src/Yi.Abp.Web/./Yi.Abp.Web.csproj" + +RUN dotnet build --source https://repo.huaweicloud.com/repository/nuget/v3/index.json "./Yi.Abp.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build + +RUN dotnet publish --source https://repo.huaweicloud.com/repository/nuget/v3/index.json "./Yi.Abp.Web.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false + +``` \ No newline at end of file diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj b/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj index 2623b61f..5be942ee 100644 --- a/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj @@ -10,6 +10,10 @@ + + + +