-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add frontend UI and backend svc as well
- Loading branch information
1 parent
82400f0
commit f36af89
Showing
5 changed files
with
251 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||
WORKDIR /app | ||
EXPOSE 5000 | ||
|
||
ENV ASPNETCORE_URLS=http://+:5000 | ||
|
||
USER app | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
ARG configuration=Release | ||
WORKDIR /src | ||
COPY ["TasksTracker.Processor.Backend.Svc/TasksTracker.Processor.Backend.Svc.csproj", "TasksTracker.Processor.Backend.Svc/"] | ||
RUN dotnet restore "TasksTracker.Processor.Backend.Svc/TasksTracker.Processor.Backend.Svc.csproj" | ||
COPY . . | ||
WORKDIR "/src/TasksTracker.Processor.Backend.Svc" | ||
RUN dotnet build "TasksTracker.Processor.Backend.Svc.csproj" -c $configuration -o /app/build | ||
|
||
FROM build AS publish | ||
ARG configuration=Release | ||
RUN dotnet publish "TasksTracker.Processor.Backend.Svc.csproj" -c $configuration -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "TasksTracker.Processor.Backend.Svc.dll"] |
24 changes: 24 additions & 0 deletions
24
docs/aca/99-optimize-containers/Backend.Svc.Dockerfile.chiseled.aot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0-jammy-chiseled-aot AS base | ||
WORKDIR /app | ||
EXPOSE 5000 | ||
|
||
ENV ASPNETCORE_URLS=http://+:5000 | ||
|
||
USER app | ||
FROM mcr.microsoft.com/dotnet/nightly/sdk:8.0-jammy-aot AS build | ||
ARG configuration=Release | ||
WORKDIR /src | ||
COPY ["TasksTracker.Processor.Backend.Svc/TasksTracker.Processor.Backend.Svc.csproj", "TasksTracker.Processor.Backend.Svc/"] | ||
RUN dotnet restore "TasksTracker.Processor.Backend.Svc/TasksTracker.Processor.Backend.Svc.csproj" | ||
COPY . . | ||
WORKDIR "/src/TasksTracker.Processor.Backend.Svc" | ||
RUN dotnet build "TasksTracker.Processor.Backend.Svc.csproj" -c $configuration -o /app/build | ||
|
||
FROM build AS publish | ||
ARG configuration=Release | ||
RUN dotnet publish "TasksTracker.Processor.Backend.Svc.csproj" -c $configuration -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "TasksTracker.Processor.Backend.Svc.dll"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||
WORKDIR /app | ||
EXPOSE 5000 | ||
|
||
ENV ASPNETCORE_URLS=http://+:5000 | ||
|
||
USER app | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
ARG configuration=Release | ||
WORKDIR /src | ||
COPY ["TasksTracker.WebPortal.Frontend.Ui/TasksTracker.WebPortal.Frontend.Ui.csproj", "TasksTracker.WebPortal.Frontend.Ui/"] | ||
RUN dotnet restore "TasksTracker.WebPortal.Frontend.Ui/TasksTracker.WebPortal.Frontend.Ui.csproj" | ||
COPY . . | ||
WORKDIR "/src/TasksTracker.WebPortal.Frontend.Ui" | ||
RUN dotnet build "TasksTracker.WebPortal.Frontend.Ui.csproj" -c $configuration -o /app/build | ||
|
||
FROM build AS publish | ||
ARG configuration=Release | ||
RUN dotnet publish "TasksTracker.WebPortal.Frontend.Ui.csproj" -c $configuration -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "TasksTracker.WebPortal.Frontend.Ui.dll"] |
24 changes: 24 additions & 0 deletions
24
docs/aca/99-optimize-containers/Frontend.Ui.Dockerfile.chiseled.aot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0-jammy-chiseled-aot AS base | ||
WORKDIR /app | ||
EXPOSE 5000 | ||
|
||
ENV ASPNETCORE_URLS=http://+:5000 | ||
|
||
USER app | ||
FROM mcr.microsoft.com/dotnet/nightly/sdk:8.0-jammy-aot AS build | ||
ARG configuration=Release | ||
WORKDIR /src | ||
COPY ["TasksTracker.WebPortal.Frontend.Ui/TasksTracker.WebPortal.Frontend.Ui.csproj", "TasksTracker.WebPortal.Frontend.Ui/"] | ||
RUN dotnet restore "TasksTracker.WebPortal.Frontend.Ui/TasksTracker.WebPortal.Frontend.Ui.csproj" | ||
COPY . . | ||
WORKDIR "/src/TasksTracker.WebPortal.Frontend.Ui" | ||
RUN dotnet build "TasksTracker.WebPortal.Frontend.Ui.csproj" -c $configuration -o /app/build | ||
|
||
FROM build AS publish | ||
ARG configuration=Release | ||
RUN dotnet publish "TasksTracker.WebPortal.Frontend.Ui.csproj" -c $configuration -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "TasksTracker.WebPortal.Frontend.Ui.dll"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters