MireaBackend/Dockerfile
Polianin Nikita 1c27bffa73
All checks were successful
Build and Deploy Docker Container / build-and-deploy (push) Successful in 1m48s
.NET Test Pipeline / build-and-test (push) Successful in 2m6s
build: remove pdb files
2024-07-05 02:28:18 +03:00

24 lines
686 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 --self-contained false -p:PublishSingleFile=false -o /app
FROM base AS final
WORKDIR /app
COPY --from=build /app .
RUN find . -name "*.pdb" -type f -delete
ENTRYPOINT ["dotnet", "Mirea.Api.Endpoint.dll"]