You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes:
Added platform-specific build arguments to ensure cross-platform compatibility.
Optimized dotnet restore and dotnet publish steps for better caching and faster builds.
Removed unnecessary dependencies and improved layering to reduce image size.
Ensured compatibility with Kubernetes deployments by maintaining a minimal runtime image.
The text was updated successfully, but these errors were encountered:
Updated Dockerfile to optimize for Kubernetes deployment
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:7.0 AS build
ARG TARGETPLATFORM
ARG TARGETARCH
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"
WORKDIR /source
COPY *.csproj .
RUN dotnet restore -a $TARGETARCH
COPY . .
RUN dotnet publish -c release -o /app -a $TARGETARCH --self-contained false --no-restore
Changes:
Added platform-specific build arguments to ensure cross-platform compatibility.
Optimized
dotnet restore
anddotnet publish
steps for better caching and faster builds.Removed unnecessary dependencies and improved layering to reduce image size.
Ensured compatibility with Kubernetes deployments by maintaining a minimal runtime image.
The text was updated successfully, but these errors were encountered: