From a129ed1ac7c6eb08fc0d0a45c0bdf99ba662ae25 Mon Sep 17 00:00:00 2001 From: Benjamin Petit Date: Thu, 28 Mar 2024 17:15:53 +0100 Subject: [PATCH] Update KubernetesIngress docker builds (#2446) --- samples/KubernetesIngress.Sample/Combined/Dockerfile | 7 ++++--- samples/KubernetesIngress.Sample/Ingress/Dockerfile | 7 ++++--- samples/KubernetesIngress.Sample/Monitor/Dockerfile | 7 ++++--- samples/KubernetesIngress.Sample/backend/Dockerfile | 7 ++++--- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/samples/KubernetesIngress.Sample/Combined/Dockerfile b/samples/KubernetesIngress.Sample/Combined/Dockerfile index 6bcbd4566..fdee38d76 100644 --- a/samples/KubernetesIngress.Sample/Combined/Dockerfile +++ b/samples/KubernetesIngress.Sample/Combined/Dockerfile @@ -1,12 +1,13 @@ #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM amd64/buildpack-deps:jammy-curl AS publish +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish WORKDIR /src +# We need to install the SDK manually because we might target an unreleased SDK COPY ["global.json", ""] RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --jsonfile global.json ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1 @@ -28,7 +29,7 @@ WORKDIR /src COPY . . WORKDIR /src/samples/KubernetesIngress.Sample/Combined/ -RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net6.0 +RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net8.0 FROM base AS final WORKDIR /app diff --git a/samples/KubernetesIngress.Sample/Ingress/Dockerfile b/samples/KubernetesIngress.Sample/Ingress/Dockerfile index 4fd4ef09c..9e1b5f109 100644 --- a/samples/KubernetesIngress.Sample/Ingress/Dockerfile +++ b/samples/KubernetesIngress.Sample/Ingress/Dockerfile @@ -1,12 +1,13 @@ #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM amd64/buildpack-deps:jammy-curl AS publish +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish WORKDIR /src +# We need to install the SDK manually because we might target an unreleased SDK COPY ["global.json", ""] RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --jsonfile global.json ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1 @@ -28,7 +29,7 @@ WORKDIR /src COPY . . WORKDIR /src/samples/KubernetesIngress.Sample/Ingress/ -RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net6.0 +RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net8.0 FROM base AS final WORKDIR /app diff --git a/samples/KubernetesIngress.Sample/Monitor/Dockerfile b/samples/KubernetesIngress.Sample/Monitor/Dockerfile index 0f99841b1..dc70c8edb 100644 --- a/samples/KubernetesIngress.Sample/Monitor/Dockerfile +++ b/samples/KubernetesIngress.Sample/Monitor/Dockerfile @@ -1,12 +1,13 @@ #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM amd64/buildpack-deps:jammy-curl AS publish +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish WORKDIR /src +# We need to install the SDK manually because we might target an unreleased SDK COPY ["global.json", ""] RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --jsonfile global.json ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1 @@ -28,7 +29,7 @@ WORKDIR /src COPY . . WORKDIR /src/samples/KubernetesIngress.Sample/Monitor/ -RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net6.0 +RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net8.0 FROM base AS final WORKDIR /app diff --git a/samples/KubernetesIngress.Sample/backend/Dockerfile b/samples/KubernetesIngress.Sample/backend/Dockerfile index 02f18d9a7..e08ade00a 100644 --- a/samples/KubernetesIngress.Sample/backend/Dockerfile +++ b/samples/KubernetesIngress.Sample/backend/Dockerfile @@ -1,12 +1,13 @@ #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM amd64/buildpack-deps:jammy-curl AS publish +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish WORKDIR /src +# We need to install the SDK manually because we might target an unreleased SDK COPY ["global.json", ""] RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --jsonfile global.json ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1 @@ -14,7 +15,7 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1 COPY ["samples/KubernetesIngress.Sample/backend", "backend"] WORKDIR /src/backend -RUN /root/.dotnet/dotnet publish -c Release -o /app/publish -f net6.0 +RUN /root/.dotnet/dotnet publish -c Release -o /app/publish -f net8.0 FROM base AS final WORKDIR /app