docker_exporter/Dockerfile
2019-12-22 18:16:40 +00:00

17 lines
No EOL
391 B
Docker

FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /app
# Separate layers here to avoid redoing dependencies on code change.
COPY *.sln .
COPY *.csproj .
RUN dotnet restore
# Now the code.
COPY . .
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS runtime
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "docker_exporter.dll"]