diff --git a/Dockerfile b/Dockerfile index 47f7e65..80d2ed6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,12 +6,12 @@ WORKDIR /src # 先复制 csproj,单独 restore(利用层缓存) COPY gitea-mcp.csproj . -RUN --mount=type=cache,target=/root/.nuget/packages \ +RUN --mount=type=cache,target=/root/.nuget/packages,sharing=locked \ dotnet restore gitea-mcp.csproj # 复制剩余源码并发布 COPY . . -RUN --mount=type=cache,target=/root/.nuget/packages \ +RUN --mount=type=cache,target=/root/.nuget/packages,sharing=locked \ dotnet publish gitea-mcp.csproj \ -c Release \ -o /app/publish \