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
The current Dockerfile.amd64.debug causes significantly longer rebuild times than necessary, and requires significantly more bytes to be pushed due to Docker layer changes. With the changes below, a trivial C# Module on rebuild only needs to push ~10MB instead of 170MB+, and rebuilds are faster since the vsdbg layer is cached. The main issue is vsdbg is installed as one of the last steps, when it should be installed as one of the first steps.
Current Dockerfile.amd64.debug template:
FROM microsoft/dotnet:2.0-sdk AS build-env
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Debug -o out
FROM microsoft/dotnet:2.0-runtime-stretch AS runtime
WORKDIR /app
COPY --from=build-env /app/out ./
RUN apt-get update
RUN apt-get install -y unzip procps
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg
ENTRYPOINT ["dotnet", "echo-service.dll"]
Improved Dockerfile.amd64.debug template:
FROM microsoft/dotnet:2.0-runtime-stretch AS runtime
RUN apt-get update
RUN apt-get install -y unzip procps
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg
FROM microsoft/dotnet:2.0-sdk AS build-env
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Debug -o out
FROM runtime
WORKDIR /app
COPY --from=build-env /app/out ./
ENTRYPOINT ["dotnet", "echo-service.dll"]
The text was updated successfully, but these errors were encountered:
The current Dockerfile.amd64.debug causes significantly longer rebuild times than necessary, and requires significantly more bytes to be pushed due to Docker layer changes. With the changes below, a trivial C# Module on rebuild only needs to push ~10MB instead of 170MB+, and rebuilds are faster since the vsdbg layer is cached. The main issue is vsdbg is installed as one of the last steps, when it should be installed as one of the first steps.
Current Dockerfile.amd64.debug template:
Improved Dockerfile.amd64.debug template:
The text was updated successfully, but these errors were encountered: