MireaBackend/Dockerfile
Polianin Nikita 7e82d4a520
All checks were successful
.NET Test Pipeline / build-and-test (push) Successful in 2m8s
Build and Deploy Docker Container / build-and-deploy (push) Successful in 9m4s
build: fix name of program
2024-07-03 01:09:06 +03:00

23 lines
585 B
Docker

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
LABEL company="Winsomnia"
LABEL maintainer.name="Wesser" maintainer.email="support@winsomnia.net"
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY . .
ARG NUGET_USERNAME
ARG NUGET_PASSWORD
ENV NUGET_USERNAME=$NUGET_USERNAME
ENV NUGET_PASSWORD=$NUGET_PASSWORD
RUN dotnet restore ./Backend.sln --configfile nuget.config
WORKDIR /app
WORKDIR /src
RUN dotnet publish ./Endpoint/Endpoint.csproj -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["dotnet", "Endpoint.dll"]