created Dockerfile #11

This commit is contained in:
Nicolas Constant 2020-12-28 01:33:09 -05:00
parent 79ae28acae
commit f585197e90
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688

View file

@ -6,15 +6,16 @@ EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["BirdsiteLive/BirdsiteLive.csproj", "BirdsiteLive/"]
RUN dotnet restore "BirdsiteLive/BirdsiteLive.csproj"
# WORKDIR /src
# COPY ["/src/BirdsiteLive/BirdsiteLive.csproj", "BirdsiteLive/"]
COPY . .
WORKDIR "/src/BirdsiteLive"
RUN dotnet build "BirdsiteLive.csproj" -c Release -o /app/build
RUN dotnet restore "/src/BirdsiteLive/BirdsiteLive.csproj"
# COPY . .
# WORKDIR /BirdsiteLive
RUN dotnet build "/src/BirdsiteLive/BirdsiteLive.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "BirdsiteLive.csproj" -c Release -o /app/publish
RUN dotnet publish "/src/BirdsiteLive/BirdsiteLive.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app