From 5e87416fa8120959025cf72e40de7a4d3a9fbd42 Mon Sep 17 00:00:00 2001 From: weibaohui Date: Thu, 23 Nov 2023 22:28:18 +0800 Subject: [PATCH] kubectl image update --- BlazorApp/Dockerfile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/BlazorApp/Dockerfile b/BlazorApp/Dockerfile index 5259775f..03d2762a 100644 --- a/BlazorApp/Dockerfile +++ b/BlazorApp/Dockerfile @@ -16,17 +16,13 @@ FROM build AS publish RUN dotnet publish "BlazorApp.csproj" -c Release -o /app/publish -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS kubectl -RUN apt-get update && apt-get install -y apt-transport-https curl gnupg \ -&& curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add - \ -&& echo "deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main" >/etc/apt/sources.list.d/kubernetes.list \ -&& apt-get update \ -&& apt-get install -y kubectl +FROM bitnami/kubectl:latest as kubectl FROM base AS final WORKDIR /app ENV ASPNETCORE_ENVIRONMENT Production COPY --from=publish /app/publish . -COPY --from=kubectl /usr/bin/kubectl /usr/bin/kubectl +COPY --from=kubectl /opt/bitnami/kubectl/bin/kubectl /usr/bin/kubectl + ENTRYPOINT ["dotnet", "BlazorApp.dll"]