File tree 5 files changed +39
-1
lines changed
5 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -398,4 +398,5 @@ FodyWeavers.xsd
398
398
* .sln.iml
399
399
400
400
401
- .idea
401
+ .idea
402
+ huajibot.tar
Original file line number Diff line number Diff line change
1
+ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.18 AS build-env
2
+
3
+ COPY . /root/build
4
+
5
+ ARG TARGETARCH
6
+
7
+ WORKDIR /root/build
8
+ RUN dotnet publish src/HuaJiBot.NET.CLI \
9
+ -c Release \
10
+ -a $TARGETARCH \
11
+ --no-self-contained \
12
+ -p:PublishSingleFile=true \
13
+ --framework net8.0 \
14
+ -o /root/out
15
+
16
+ FROM mcr.microsoft.com/dotnet/runtime:8.0-alpine3.18
17
+
18
+ COPY --from=build-env /root/out/HuaJiBot.NET.CLI /app/bin/HuaJiBot.NET.CLI
19
+
20
+ RUN mkdir /app/data \
21
+ && adduser -D user \
22
+ && chmod +x /app/bin/HuaJiBot.NET.CLI
23
+
24
+ WORKDIR /app/data
25
+ ENTRYPOINT ["/app/bin/HuaJiBot.NET.CLI" ]
Original file line number Diff line number Diff line change
1
+ dotnet publish src/HuaJiBot.NET.CLI \
2
+ -c Release \
3
+ --no-self-contained \
4
+ -p:PublishSingleFile=true \
5
+ --framework net8.0 \
6
+ -o /root/out
Original file line number Diff line number Diff line change
1
+ # docker buildx build -t huajibot --platform linux/arm64 -t huajibot_arm64 -o bin .
2
+ docker buildx build -t huajibot --platform linux/amd64 --load .
3
+ docker save -o huajibot.tar huajibot
Original file line number Diff line number Diff line change
1
+ # docker buildx build -t huajibot --platform linux/arm64 -t huajibot_arm64 -o bin .
2
+ docker buildx build -t huajibot --platform linux/arm64 --load .
3
+ docker save -o huajibot.tar huajibot
You can’t perform that action at this time.
0 commit comments