Created backend
This commit is contained in:
parent
37f949a850
commit
167f9574d2
27 changed files with 534 additions and 0 deletions
20
backend/SinkyShipsAPI/Dockerfile
Normal file
20
backend/SinkyShipsAPI/Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
|||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["SinkyShipsAPI/SinkyShipsAPI.csproj", "SinkyShipsAPI/"]
|
||||
RUN dotnet restore "SinkyShipsAPI/SinkyShipsAPI.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/SinkyShipsAPI"
|
||||
RUN dotnet build "SinkyShipsAPI.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "SinkyShipsAPI.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "SinkyShipsAPI.dll"]
|
Loading…
Add table
Add a link
Reference in a new issue