Skip to content

Commit

Permalink
add docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
moonheart committed Sep 10, 2023
1 parent 8fb60eb commit af52757
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
**/MementoMori.WebUI/Master/
**/MementoMori.WebUI/battlePowerDebug/
**/account.xml
**/runtimeinfo.json
**/usersyncdata.json
24 changes: 24 additions & 0 deletions MementoMori.WebUI/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["MementoMori.WebUI/MementoMori.WebUI.csproj", "MementoMori.WebUI/"]
COPY ["MementoMori.Common/MementoMori.Common.csproj", "MementoMori.Common/"]
COPY ["MementoMori/MementoMori.csproj", "MementoMori/"]
COPY ["MementoMori.Ortega/MementoMori.Ortega.csproj", "MementoMori.Ortega/"]
RUN dotnet restore "MementoMori.WebUI/MementoMori.WebUI.csproj"
COPY . .
WORKDIR "/src/MementoMori.WebUI"
RUN dotnet build "MementoMori.WebUI.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "MementoMori.WebUI.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "MementoMori.WebUI.dll"]

0 comments on commit af52757

Please sign in to comment.