feat: use Alpine AOT images, static SQLite and Podman host metrics [CI]
ci/woodpecker/push/main-amd64-build Pipeline failed
ci/woodpecker/push/main-amd64-build Pipeline failed
This commit is contained in:
37 files changed
+719
-309
No files matched your search
@@ -1,9 +1,9 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble-aot AS build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine-aot AS build
|
||||
|
||||
WORKDIR /src/backend
|
||||
COPY restore/backend/ ./
|
||||
# restore 也要带 PublishAot:不然不会还原 ILCompiler,之后 --no-restore 的发布就悄悄变成「裁剪过的框架依赖程序」
|
||||
RUN dotnet restore probe/src/Monitor.Probe -r linux-x64 -p:PublishAot=true --artifacts-path /artifacts
|
||||
RUN dotnet restore probe/src/Monitor.Probe -r linux-musl-x64 -p:PublishAot=true --artifacts-path /artifacts
|
||||
|
||||
COPY source/backend/ ./
|
||||
# 构建信息:CI 通过 --build-arg 传入;不传就是空(放在 restore 之后,每次构建都变的时间不会让依赖还原的缓存失效)
|
||||
@@ -11,7 +11,7 @@ ARG MONITOR_TAG=
|
||||
ARG MONITOR_COMMIT=
|
||||
ARG MONITOR_BUILT_AT=
|
||||
ENV MONITOR_TAG=$MONITOR_TAG MONITOR_COMMIT=$MONITOR_COMMIT MONITOR_BUILT_AT=$MONITOR_BUILT_AT
|
||||
RUN dotnet publish probe/src/Monitor.Probe -m:3 -c Release -r linux-x64 \
|
||||
RUN dotnet publish probe/src/Monitor.Probe -m:3 -c Release -r linux-musl-x64 \
|
||||
--self-contained true --no-restore -p:PublishAot=true -p:UseAotAnywhere=false \
|
||||
-p:UseAppHost=true -p:StripSymbols=true \
|
||||
-p:DebugType=none -p:DebugSymbols=false --artifacts-path /artifacts -o /out/probe
|
||||
@@ -19,7 +19,7 @@ RUN dotnet publish probe/src/Monitor.Probe -m:3 -c Release -r linux-x64 \
|
||||
RUN test -x /out/probe/monitor-probe \
|
||||
&& test "$(stat -c%s /out/probe/monitor-probe)" -gt 2000000
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/runtime-deps:10.0-noble-chiseled-extra
|
||||
FROM mcr.microsoft.com/dotnet/runtime-deps:10.0-alpine
|
||||
|
||||
ARG APP_VERSION=main
|
||||
LABEL org.opencontainers.image.title="Monitor Probe" \
|
||||
|
||||
Reference in new issue
Block a user