Files
MoShiro/packaging/container/Agent.Restore.Containerfile
T
justme 806493567b
ci/woodpecker/push/web-build Pipeline was successful
ci/woodpecker/push/verify Pipeline failed
ci/woodpecker/push/dev-image Pipeline failed
ci: share Linux restore artifacts before builds [CI]
2026-10-21 13:31:07 +08:00

17 lines
1022 B
Docker

# Resolve a native Agent RID once in the shared Buildah store. Later build jobs
# start from this image and reuse both project.assets.json and the NuGet cache.
ARG NATIVEAOT_BUILDER_IMAGE=localhost/moshiro-dotnet10-nativeaot-aotanywhere:ci
FROM --platform=linux/amd64 ${NATIVEAOT_BUILDER_IMAGE} AS toolchain
FROM toolchain AS restore
WORKDIR /src/backend
COPY restore/backend/ ./
ARG NODE_RID=linux-musl-arm64
ARG STATIC_MSQUIC=true
ENV NUGET_PACKAGES=/root/.nuget/packages
RUN --mount=type=cache,id=moshiro-nuget,target=/root/.nuget/packages,sharing=locked \
--mount=type=bind,from=toolchain,source=/root/.nuget/packages,target=/opt/nuget-seed,ro \
cp -a --update=none /opt/nuget-seed/. /root/.nuget/packages/ \
&& dotnet restore Agent.Native.proj -r "$NODE_RID" -p:PublishAot=true -p:UseAotAnywhere=true -p:SelfContained=true \
-p:StaticMsQuic="$STATIC_MSQUIC" -p:StaticExecutable="$STATIC_MSQUIC" \
-p:RuntimeFrameworkVersion=10.0.12 -p:InvariantGlobalization=true --artifacts-path /artifacts