more refactorin
This commit is contained in:
parent
4dfbcff460
commit
2372fbb620
78 changed files with 120 additions and 398 deletions
59
Dockerfile
Normal file
59
Dockerfile
Normal file
|
@ -0,0 +1,59 @@
|
|||
# https://hub.docker.com/_/microsoft-dotnet-core
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
# copy csproj and restore as distinct layers
|
||||
#COPY *.sln .
|
||||
# COPY SignalRChat/*.csproj ./aspnetapp/
|
||||
# WORKDIR /source/aspnetapp
|
||||
# RUN dotnet restore
|
||||
COPY Sledgemapper.Api/*.csproj ./Sledgemapper.Api/
|
||||
COPY Sledgemapper.Shared/*.csproj ./Sledgemapper.Shared/
|
||||
|
||||
WORKDIR /src/Sledgemapper.Api
|
||||
RUN dotnet restore
|
||||
|
||||
WORKDIR /src/Sledgemapper.Shared
|
||||
RUN dotnet restore
|
||||
|
||||
# copy everything else and build app
|
||||
WORKDIR /src
|
||||
COPY Sledgemapper.Api/. ./Sledgemapper.Api/
|
||||
COPY Sledgemapper.Shared/. ./Sledgemapper.Shared/
|
||||
WORKDIR /src/Sledgemapper.Api
|
||||
RUN dotnet publish -c release -o /app --no-restore
|
||||
|
||||
# final stage/image
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0
|
||||
WORKDIR /app
|
||||
COPY --from=build /app ./
|
||||
ENTRYPOINT ["dotnet", "SignalRChat.dll"]
|
||||
|
||||
|
||||
# # https://hub.docker.com/_/microsoft-dotnet-core
|
||||
# FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||
|
||||
# # copy csproj and restore as distinct layers
|
||||
# #COPY *.sln .
|
||||
# WORKDIR /source
|
||||
# COPY Sledgemapper.Api/*.csproj ./Sledgemapper.Api/
|
||||
# WORKDIR /source/Sledgemapper.Api
|
||||
# RUN dotnet restore
|
||||
|
||||
# WORKDIR /source
|
||||
# COPY Sledgemapper.Shared/*.csproj ./Sledgemapper.Shared/
|
||||
# WORKDIR /source/Sledgemapper.Shared
|
||||
# RUN dotnet restore
|
||||
|
||||
# # copy everything else and build app
|
||||
# WORKDIR /source
|
||||
# COPY Sledgemapper.Api/. ./Sledgemapper.Api/
|
||||
# COPY Sledgemapper.Shared/. ./Sledgemapper.Shared/
|
||||
# WORKDIR /source/Sledgemapper.Api
|
||||
# RUN dotnet publish -c release -o /app --no-restore
|
||||
|
||||
# # final stage/image
|
||||
# FROM mcr.microsoft.com/dotnet/aspnet:5.0
|
||||
# WORKDIR /app
|
||||
# COPY --from=build /app ./
|
||||
# ENTRYPOINT ["dotnet", "Sledgemapper.Api.dll"]
|
Loading…
Add table
Add a link
Reference in a new issue