Skip to content

Commit

Permalink
Update Dockerfile to .NET 9 (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
Naamloos authored Dec 2, 2024
1 parent 3b15610 commit 3ab312f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ARG GIT_SHA=v0.1

FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
WORKDIR /src
COPY . .
RUN dotnet restore
RUN dotnet publish Obsidian.ConsoleApp/ -c Release -r linux-musl-x64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:EnableCompressionInSingleFile=true -p:DebugType=embedded /p:SourceRevisionId=$GIT_SHA

FROM alpine:latest
WORKDIR /app
COPY --from=build /src/Obsidian.ConsoleApp/bin/Release/net8.0/linux-musl-x64/publish/ .
COPY --from=build /src/Obsidian.ConsoleApp/bin/Release/net9.0/linux-musl-x64/publish/ .
RUN apk upgrade --update-cache --available && apk add openssl libstdc++ && rm -rf /var/cache/apk/*

WORKDIR /files
Expand Down

0 comments on commit 3ab312f

Please sign in to comment.