File tree Expand file tree Collapse file tree 3 files changed +70
-0
lines changed
Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ ** /.dockerignore
2+ ** /.env
3+ ** /.git
4+ ** /.gitignore
5+ ** /.project
6+ ** /.settings
7+ ** /.toolstarget
8+ ** /.vs
9+ ** /.vscode
10+ ** /.idea
11+ ** /* . * proj.user
12+ ** /* .dbmdl
13+ ** /* .jfm
14+ ** /azds.yaml
15+ ** /bin
16+ ** /charts
17+ ** /docker-compose *
18+ ** /Dockerfile *
19+ ** /node_modules
20+ ** /npm-debug.log
21+ ** /obj
22+ ** /secrets.dev.yaml
23+ ** /values.dev.yaml
24+ LICENSE
25+ README.md
Original file line number Diff line number Diff line change 1+ FROM ubuntu:noble AS base
2+ USER root
3+ RUN apt update && apt install -y ca-certificates
4+ RUN apt install -y busybox && busybox --install
5+ USER $APP_UID
6+ WORKDIR /app
7+
8+ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
9+ RUN apt update && apt install -y gcc
10+ ARG BUILD_CONFIGURATION=Release
11+ ARG GIT_SHA=Unknown
12+ ENV DOCKER=true
13+ WORKDIR /src
14+ COPY ["Lagrange.Milky/Lagrange.Milky.csproj" , "Lagrange.Milky/" ]
15+ COPY ["Lagrange.Codec/Lagrange.Codec.csproj" , "Lagrange.Codec/" ]
16+ COPY ["Lagrange.Core/Lagrange.Core.csproj" , "Lagrange.Core/" ]
17+ COPY ["Lagrange.Proto.Generator/Lagrange.Proto.Generator.csproj" , "Lagrange.Proto.Generator/" ]
18+ COPY ["Lagrange.Proto/Lagrange.Proto.csproj" , "Lagrange.Proto/" ]
19+ COPY ["Lagrange.Milky.Implementation.Api.Generator/Lagrange.Milky.Implementation.Api.Generator.csproj" , "Lagrange.Milky.Implementation.Api.Generator/" ]
20+ RUN dotnet restore "Lagrange.Milky/Lagrange.Milky.csproj"
21+ COPY . .
22+ WORKDIR "/src/Lagrange.Milky"
23+ RUN dotnet build "./Lagrange.Milky.csproj" -p:SourceRevisionId=$GIT_SHA -c $BUILD_CONFIGURATION -o /app/build
24+
25+ FROM build AS publish
26+ ARG BUILD_CONFIGURATION=Release
27+ RUN dotnet publish "./Lagrange.Milky.csproj" -p:SourceRevisionId=$GIT_SHA -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
28+
29+ FROM base AS final
30+ WORKDIR /app
31+ ENV DOCKER=true
32+ COPY --from=publish /app/publish .
33+ WORKDIR /data
34+ ENTRYPOINT ["/app/Lagrange.Milky" ]
Original file line number Diff line number Diff line change 66 <Nullable >enable</Nullable >
77 <PublishAot >true</PublishAot >
88 </PropertyGroup >
9+ <PropertyGroup Condition =" '$(DOCKER)' == 'true' " >
10+ <DockerDefaultTargetOS >Linux</DockerDefaultTargetOS >
11+ <InvariantGlobalization >true</InvariantGlobalization >
12+ <DefineConstants >DOCKER</DefineConstants >
13+ </PropertyGroup >
914 <PropertyGroup Condition =" '$(Configuration)' == 'Debug'" >
1015 <EmitCompilerGeneratedFiles >true</EmitCompilerGeneratedFiles >
1116 </PropertyGroup >
3338 <ItemGroup >
3439 <EmbeddedResource Include =" Resources\appsettings.jsonc" />
3540 </ItemGroup >
41+
42+ <ItemGroup >
43+ <Content Include =" ..\.dockerignore" >
44+ <Link >.dockerignore</Link >
45+ </Content >
46+ </ItemGroup >
3647</Project >
You can’t perform that action at this time.
0 commit comments