forked from kiapanahi/Aspire.ResourceServer.Standalone
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 1.26 KB
/
Dockerfile
File metadata and controls
34 lines (23 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
WORKDIR /app
EXPOSE 80
ENV DOTNET_CLI_TELEMETRY_OPTOUT=true \
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true \
ASPNETCORE_URLS=http://+:80 \
ASPNETCORE_ENVIRONMENT=Production
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY src/Aspire.ResourceService.Standalone.Server/Aspire.ResourceService.Standalone.Server.csproj Aspire.ResourceService.Standalone.Server/
COPY src/Aspire.ResourceService.Standalone.ServiceDefaults/Aspire.ResourceService.Standalone.ServiceDefaults.csproj Aspire.ResourceService.Standalone.ServiceDefaults/
COPY Directory.Build.props ./
RUN dotnet restore Aspire.ResourceService.Standalone.Server/Aspire.ResourceService.Standalone.Server.csproj
COPY src/ .
RUN dotnet build Aspire.ResourceService.Standalone.Server/Aspire.ResourceService.Standalone.Server.csproj -f net9.0 -c ${BUILD_CONFIGURATION} -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish Aspire.ResourceService.Standalone.Server/Aspire.ResourceService.Standalone.Server.csproj -f net9.0 -c ${BUILD_CONFIGURATION} -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Aspire.ResourceService.Standalone.Server.dll"]