mirror of
https://github.com/irongut/CodeCoverageSummary.git
synced 2026-05-19 00:10:14 +02:00
simplified Dockerfile
This commit is contained in:
+7
-10
@@ -1,15 +1,11 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS base
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||||
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/"]
|
COPY ["src/CodeCoverageSummary", "CodeCoverageSummary/"]
|
||||||
RUN dotnet build CodeCoverageSummary/CodeCoverageSummary.csproj -c Release -o /app/build
|
COPY ["src/coverage.cobertura.xml", "sample.coverage.xml"]
|
||||||
|
RUN dotnet build CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /app/build
|
||||||
FROM build AS publish
|
RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /app/publish
|
||||||
RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj -c Release -o /app/publish
|
|
||||||
|
|
||||||
# Label the container
|
# Label the container
|
||||||
LABEL maintainer="Irongut <murray.dave@outlook.com>"
|
LABEL maintainer="Irongut <murray.dave@outlook.com>"
|
||||||
@@ -22,7 +18,8 @@ LABEL com.github.actions.description="A GitHub Action that reads Cobertura forma
|
|||||||
LABEL com.github.actions.icon="book-open"
|
LABEL com.github.actions.icon="book-open"
|
||||||
LABEL com.github.actions.color="purple"
|
LABEL com.github.actions.color="purple"
|
||||||
|
|
||||||
FROM base AS final
|
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=build /app/publish .
|
||||||
|
COPY --from=build src/CodeCoverageSummary/sample.coverage.xml .
|
||||||
ENTRYPOINT ["dotnet", "CodeCoverageSummary.dll"]
|
ENTRYPOINT ["dotnet", "CodeCoverageSummary.dll"]
|
||||||
Reference in New Issue
Block a user