mirror of
https://github.com/irongut/CodeCoverageSummary.git
synced 2026-05-19 16:30:14 +02:00
reduced number of Docker image layers
This commit is contained in:
+4
-5
@@ -1,11 +1,10 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||||
|
COPY ["src/coverage.cobertura.xml", "/publish/sample.coverage.xml"]
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY ["src/CodeCoverageSummary/CodeCoverageSummary.csproj", "CodeCoverageSummary/"]
|
COPY ["src/CodeCoverageSummary/CodeCoverageSummary.csproj", "CodeCoverageSummary/"]
|
||||||
RUN dotnet restore CodeCoverageSummary/CodeCoverageSummary.csproj
|
RUN dotnet restore CodeCoverageSummary/CodeCoverageSummary.csproj
|
||||||
COPY ["src/CodeCoverageSummary", "CodeCoverageSummary/"]
|
COPY ["src/CodeCoverageSummary", "CodeCoverageSummary/"]
|
||||||
COPY ["src/coverage.cobertura.xml", "sample.coverage.xml"]
|
RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /publish
|
||||||
RUN dotnet build CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /app/build
|
|
||||||
RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /app/publish
|
|
||||||
|
|
||||||
# Label the container
|
# Label the container
|
||||||
LABEL maintainer="Irongut <murray.dave@outlook.com>"
|
LABEL maintainer="Irongut <murray.dave@outlook.com>"
|
||||||
@@ -20,6 +19,6 @@ LABEL com.github.actions.color="purple"
|
|||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS final
|
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app/publish .
|
COPY --from=build /publish .
|
||||||
COPY --from=build /src/sample.coverage.xml .
|
ENV DOTNET_EnableDiagnostics=0
|
||||||
ENTRYPOINT ["dotnet", "/app/CodeCoverageSummary.dll"]
|
ENTRYPOINT ["dotnet", "/app/CodeCoverageSummary.dll"]
|
||||||
Reference in New Issue
Block a user