diff --git a/Dockerfile b/Dockerfile index 2e15f25..82de9fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,12 +6,12 @@ WORKDIR /src # 先只复制 csproj,利用层缓存加速 restore COPY obsidian-mcp.csproj ./ -RUN --mount=type=cache,target=/root/.nuget/packages \ +RUN --mount=type=cache,target=/root/.nuget/packages,sharing=locked \ dotnet restore obsidian-mcp.csproj # 复制全部源码并 publish COPY . . -RUN --mount=type=cache,target=/root/.nuget/packages \ +RUN --mount=type=cache,target=/root/.nuget/packages,sharing=locked \ dotnet publish obsidian-mcp.csproj \ --configuration Release \ --no-restore \