Skip to content

Commit a129ed1

Browse files
Update KubernetesIngress docker builds (dotnet#2446)
1 parent c301810 commit a129ed1

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

samples/KubernetesIngress.Sample/Combined/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
22

3-
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
3+
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
44
WORKDIR /app
55
EXPOSE 80
66
EXPOSE 443
77

8-
FROM amd64/buildpack-deps:jammy-curl AS publish
8+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish
99
WORKDIR /src
10+
# We need to install the SDK manually because we might target an unreleased SDK
1011
COPY ["global.json", ""]
1112
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --jsonfile global.json
1213
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1
@@ -28,7 +29,7 @@ WORKDIR /src
2829
COPY . .
2930

3031
WORKDIR /src/samples/KubernetesIngress.Sample/Combined/
31-
RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net6.0
32+
RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net8.0
3233

3334
FROM base AS final
3435
WORKDIR /app

samples/KubernetesIngress.Sample/Ingress/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
22

3-
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
3+
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
44
WORKDIR /app
55
EXPOSE 80
66
EXPOSE 443
77

8-
FROM amd64/buildpack-deps:jammy-curl AS publish
8+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish
99
WORKDIR /src
10+
# We need to install the SDK manually because we might target an unreleased SDK
1011
COPY ["global.json", ""]
1112
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --jsonfile global.json
1213
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1
@@ -28,7 +29,7 @@ WORKDIR /src
2829
COPY . .
2930

3031
WORKDIR /src/samples/KubernetesIngress.Sample/Ingress/
31-
RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net6.0
32+
RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net8.0
3233

3334
FROM base AS final
3435
WORKDIR /app

samples/KubernetesIngress.Sample/Monitor/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
22

3-
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
3+
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
44
WORKDIR /app
55
EXPOSE 80
66
EXPOSE 443
77

8-
FROM amd64/buildpack-deps:jammy-curl AS publish
8+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish
99
WORKDIR /src
10+
# We need to install the SDK manually because we might target an unreleased SDK
1011
COPY ["global.json", ""]
1112
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --jsonfile global.json
1213
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1
@@ -28,7 +29,7 @@ WORKDIR /src
2829
COPY . .
2930

3031
WORKDIR /src/samples/KubernetesIngress.Sample/Monitor/
31-
RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net6.0
32+
RUN /root/.dotnet/dotnet publish -c Release --no-restore -o /app/publish -f net8.0
3233

3334
FROM base AS final
3435
WORKDIR /app

samples/KubernetesIngress.Sample/backend/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
22

3-
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
3+
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
44
WORKDIR /app
55
EXPOSE 80
66
EXPOSE 443
77

8-
FROM amd64/buildpack-deps:jammy-curl AS publish
8+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish
99
WORKDIR /src
10+
# We need to install the SDK manually because we might target an unreleased SDK
1011
COPY ["global.json", ""]
1112
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --jsonfile global.json
1213
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1
1314

1415
COPY ["samples/KubernetesIngress.Sample/backend", "backend"]
1516

1617
WORKDIR /src/backend
17-
RUN /root/.dotnet/dotnet publish -c Release -o /app/publish -f net6.0
18+
RUN /root/.dotnet/dotnet publish -c Release -o /app/publish -f net8.0
1819

1920
FROM base AS final
2021
WORKDIR /app

0 commit comments

Comments
 (0)