Skip to content
This repository was archived by the owner on May 27, 2026. It is now read-only.

Commit e066a3e

Browse files
committed
[Milky] Dockerize
1 parent 05365b4 commit e066a3e

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*
2+
3+
!.git/
4+
!Lagrange.Codec/
5+
!Lagrange.Core/
6+
!Lagrange.Milky/
7+
!Lagrange.Milky.Implementation.Api.Generator/
8+
!Lagrange.Proto/
9+
!Lagrange.Proto.Generator/

Lagrange.Milky/Lagrange.Milky.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<PublishAot>true</PublishAot>
8+
<InvariantGlobalization>true</InvariantGlobalization>
9+
<StaticExecutable>true</StaticExecutable>
810
</PropertyGroup>
911
<PropertyGroup Condition=" '$(Configuration)' == 'Debug'">
1012
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine-aot AS build
2+
3+
WORKDIR /app/src
4+
5+
COPY --link Lagrange.Codec/*.csproj Lagrange.Codec/
6+
COPY --link Lagrange.Core/*.csproj Lagrange.Core/
7+
COPY --link Lagrange.Milky/*.csproj Lagrange.Milky/
8+
COPY --link Lagrange.Milky.Implementation.Api.Generator/*.csproj Lagrange.Milky.Implementation.Api.Generator/
9+
COPY --link Lagrange.Proto/*.csproj Lagrange.Proto/
10+
COPY --link Lagrange.Proto.Generator/*.csproj Lagrange.Proto.Generator/
11+
RUN dotnet restore Lagrange.Milky
12+
13+
COPY --link . .
14+
RUN dotnet publish Lagrange.Milky -c Release -p:DebugType=none -o /app/bin
15+
16+
17+
FROM scratch
18+
19+
COPY --from=build /app/bin/ .
20+
ENTRYPOINT ["./Lagrange.Milky"]

0 commit comments

Comments
 (0)