-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (28 loc) · 894 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
WORKDIR /app
COPY ./ ./
#COPY ./.env ./Matricula.WebUI/.env
RUN dotnet tool install --global dotnet-ef
#ENV PATH="${PATH}:/root/.dotnet/tools"
#RUN dotnet ef database update --project Matricula.Infrastructure --startup-project Matricula.WebUI
RUN dotnet publish --configuration Release
FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /app
RUN apt update
RUN apt install -y curl
COPY ./.env ./.env
ENV ASPNETCORE_ENVIRONMENT=Production
ENV DOTNET_PRINT_TELEMETRY_MESSAGE=false
COPY --from=build-env /app/Matricula.WebUI/bin/Release/net6.0 .
EXPOSE 80
ENTRYPOINT ["dotnet", "Matricula.WebUI.dll"]
#COPY Matricula/Matricula.WebUI/bin/Release/net6.0/ App/
#WORKDIR /App
#
#ENV DOTNET_EnableDiagnostics=0
#
#RUN dotnet tool install --global dotnet-ef
#
#RUN dotnet publish --configuration Release
#
#ENTRYPOINT ["dotnet", "Matricula.WebUI.dll"]