docker_exporter/Dockerfile
Sebastian Leheis 2710cf610b
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
/ build (push) Has been cancelled
tried to remove error
2025-03-19 00:50:15 +01:00

17 lines
442 B
Docker

FROM mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim 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 --self-contained -r debian.12-x64 -c Release -o out; exit 0
FROM mcr.microsoft.com/dotnet/runtime:6.0-bookworm-slim AS runtime
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["./docker_exporter"]