-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (18 loc) · 793 Bytes
/
Dockerfile
File metadata and controls
21 lines (18 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /source
COPY Ticketer.sln .
COPY Ticketer.Business/Ticketer.Business.csproj ./Ticketer.Business/Ticketer.Business.csproj
COPY Ticketer.WebApp/Ticketer.WebApp.csproj ./Ticketer.WebApp/Ticketer.WebApp.csproj
RUN dotnet restore ./Ticketer.Business/Ticketer.Business.csproj
RUN dotnet restore ./Ticketer.WebApp/Ticketer.WebApp.csproj
COPY Ticketer.Business/. ./Ticketer.Business/
COPY Ticketer.WebApp/. ./Ticketer.WebApp/
WORKDIR /source/Ticketer.WebApp
RUN dotnet publish -c release /p:EnvironmentName=docker-compose-dev -o /app
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /app
COPY --from=build /app ./
ENV ASPNETCORE_ENVIRONMENT=DockerDev
ENV ASPNETCORE_URLS=http://+:5001
EXPOSE 5001
ENTRYPOINT ["dotnet", "Ticketer.WebApp.dll"]