Skip to content

Commit

Permalink
Upgrade Dockerfiles to .NET8
Browse files Browse the repository at this point in the history
  • Loading branch information
krzlabrdx committed Feb 23, 2024
1 parent 80edcaf commit f35345a
Show file tree
Hide file tree
Showing 5 changed files with 3,784 additions and 27 deletions.
12 changes: 3 additions & 9 deletions apps/DataAggregator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# This dockerfile should be build with the context at the root of the repo, eg, from the repo root:
# docker build -f apps/DataAggregator/Dockerfile .

# We use 7.0-bookworm-slim for Debian 12 with glibc 2.36+, to get at least glibc 2.33 for the engine toolkit
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bookworm-slim AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:7.0-bookworm-slim AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
WORKDIR /src
COPY babylon-gateway.sln \
babylon-gateway.sln.DotSettings \
Expand All @@ -26,11 +25,6 @@ FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .

RUN groupadd --gid 1000 app && \
useradd --uid 1000 --gid 1000 -m app

USER 1000
USER app

ENTRYPOINT ["dotnet", "DataAggregator.dll"]

# TODO use local paths and adjust context for CI/CD
12 changes: 3 additions & 9 deletions apps/DatabaseMigrations/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# This dockerfile should be build with the context at the root of the repo, eg, from the repo root:
# docker build -f apps/DatabaseMigrations/Dockerfile .

# We use 7.0-bookworm-slim for Debian 12 with glibc 2.36+, to get at least glibc 2.33 for the engine toolkit
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bookworm-slim AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:7.0-bookworm-slim AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
WORKDIR /src
COPY babylon-gateway.sln \
babylon-gateway.sln.DotSettings \
Expand All @@ -26,11 +25,6 @@ FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .

RUN groupadd --gid 1000 app && \
useradd --uid 1000 --gid 1000 -m app

USER 1000
USER app

ENTRYPOINT ["dotnet", "DatabaseMigrations.dll"]

# TODO use local paths and adjust context for CI/CD
12 changes: 3 additions & 9 deletions apps/GatewayApi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# This dockerfile should be build with the context at the root of the repo, eg, from the repo root:
# docker build -f apps/GatewayAPI/Dockerfile .

# We use 7.0-bookworm-slim for Debian 12 with glibc 2.36+, to get at least glibc 2.33 for the engine toolkit
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bookworm-slim AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:7.0-bookworm-slim AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
WORKDIR /src
COPY babylon-gateway.sln \
babylon-gateway.sln.DotSettings \
Expand All @@ -26,11 +25,6 @@ FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .

RUN groupadd --gid 1000 app && \
useradd --uid 1000 --gid 1000 -m app

USER 1000
USER app

ENTRYPOINT ["dotnet", "GatewayApi.dll"]

# TODO use local paths and adjust context for CI/CD
Loading

0 comments on commit f35345a

Please sign in to comment.