-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (19 loc) · 853 Bytes
/
Copy pathDockerfile
File metadata and controls
22 lines (19 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /source
COPY Directory.Build.props Directory.Packages.props global.json ./
COPY src/SchemaRag.Domain/SchemaRag.Domain.csproj src/SchemaRag.Domain/
COPY src/SchemaRag.Application/SchemaRag.Application.csproj src/SchemaRag.Application/
COPY src/SchemaRag.Infrastructure/SchemaRag.Infrastructure.csproj src/SchemaRag.Infrastructure/
COPY src/SchemaRag.Api/SchemaRag.Api.csproj src/SchemaRag.Api/
RUN dotnet restore src/SchemaRag.Api/SchemaRag.Api.csproj
COPY src/ src/
RUN dotnet publish src/SchemaRag.Api/SchemaRag.Api.csproj \
--configuration Release \
--no-restore \
--output /app/publish
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
WORKDIR /app
COPY --from=build --chown=$APP_UID:$APP_UID /app/publish ./
USER $APP_UID
EXPOSE 8080
ENTRYPOINT ["dotnet", "SchemaRag.Api.dll"]