Skip to content

Commit

Permalink
[ci skip] update dockerfile and docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Naamloos committed Dec 12, 2024
1 parent d28abfe commit 6a5f185
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ 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
RUN dotnet publish Obsidian.ConsoleApp/ -c Release -o out /p:SourceRevisionId=$GIT_SHA

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

WORKDIR /files
ENTRYPOINT DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 /app/Obsidian.ConsoleApp
# set env variable
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
ENTRYPOINT ["dotnet", "/app/Obsidian.ConsoleApp"]
5 changes: 1 addition & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.9" # Docker compose version, NOT project version

services:
obsidian:
build: .
Expand All @@ -10,5 +8,4 @@ services:
- obsidian-files:/files

volumes:
obsidian-files:
{}
obsidian-files:

0 comments on commit 6a5f185

Please sign in to comment.