-
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 container optimizations * Fix copy/paste issue * Add frontend UI and backend svc as well * Move appendix from 13 to 30 * Move appendix from 13 to 30 * Move authors to 29 * Change Optimize modules from 99 to 12 * Update path from 99 to 12 * Minor copy change
- Loading branch information
1 parent
ca6423a
commit 7bf6d18
Showing
31 changed files
with
507 additions
and
17 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
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
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
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
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
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
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
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.TasksManager.Backend.Api/TasksTracker.TasksManager.Backend.Api.csproj", "TasksTracker.TasksManager.Backend.Api/"] | ||
RUN dotnet restore "TasksTracker.TasksManager.Backend.Api/TasksTracker.TasksManager.Backend.Api.csproj" | ||
COPY . . | ||
WORKDIR "/src/TasksTracker.TasksManager.Backend.Api" | ||
RUN dotnet build "TasksTracker.TasksManager.Backend.Api.csproj" -c $configuration -o /app/build | ||
|
||
FROM build AS publish | ||
ARG configuration=Release | ||
RUN dotnet publish "TasksTracker.TasksManager.Backend.Api.csproj" -c $configuration -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "TasksTracker.TasksManager.Backend.Api.dll"] |
24 changes: 24 additions & 0 deletions
24
docs/aca/12-optimize-containers/Backend.Api.Dockerfile.chiseled
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-jammy-chiseled AS base | ||
WORKDIR /app | ||
EXPOSE 5000 | ||
|
||
ENV ASPNETCORE_URLS=http://+:5000 | ||
|
||
USER app | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build | ||
ARG configuration=Release | ||
WORKDIR /src | ||
COPY ["TasksTracker.TasksManager.Backend.Api/TasksTracker.TasksManager.Backend.Api.csproj", "TasksTracker.TasksManager.Backend.Api/"] | ||
RUN dotnet restore "TasksTracker.TasksManager.Backend.Api/TasksTracker.TasksManager.Backend.Api.csproj" | ||
COPY . . | ||
WORKDIR "/src/TasksTracker.TasksManager.Backend.Api" | ||
RUN dotnet build "TasksTracker.TasksManager.Backend.Api.csproj" -c $configuration -o /app/build | ||
|
||
FROM build AS publish | ||
ARG configuration=Release | ||
RUN dotnet publish "TasksTracker.TasksManager.Backend.Api.csproj" -c $configuration -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "TasksTracker.TasksManager.Backend.Api.dll"] |
24 changes: 24 additions & 0 deletions
24
docs/aca/12-optimize-containers/Backend.Api.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.TasksManager.Backend.Api/TasksTracker.TasksManager.Backend.Api.csproj", "TasksTracker.TasksManager.Backend.Api/"] | ||
RUN dotnet restore "TasksTracker.TasksManager.Backend.Api/TasksTracker.TasksManager.Backend.Api.csproj" | ||
COPY . . | ||
WORKDIR "/src/TasksTracker.TasksManager.Backend.Api" | ||
RUN dotnet build "TasksTracker.TasksManager.Backend.Api.csproj" -c $configuration -o /app/build | ||
|
||
FROM build AS publish | ||
ARG configuration=Release | ||
RUN dotnet publish "TasksTracker.TasksManager.Backend.Api.csproj" -c $configuration -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "TasksTracker.TasksManager.Backend.Api.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.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/12-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/12-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"] |
Oops, something went wrong.