Skip to content

Commit

Permalink
kubectl image update
Browse files Browse the repository at this point in the history
  • Loading branch information
weibaohui committed Nov 23, 2023
1 parent 96cada9 commit 5e87416
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions BlazorApp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 5e87416

Please sign in to comment.