Skip to content

Commit

Permalink
Fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
cubicgraphics committed May 14, 2024
1 parent 946fada commit cfd4424
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.*
run
out
Dockerfile
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
WORKDIR /app

# Restore the project
COPY . ./
RUN dotnet restore

# Build the project
RUN dotnet publish -c Release -p:PublishReadyToRun=true -r linux-x64 -o out

# Run the application
FROM mcr.microsoft.com/dotnet/runtime:7.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "/app/BeatTogether.Status.Api.dll"]

0 comments on commit cfd4424

Please sign in to comment.