Corrected the .dockerfile to use the correct build image
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
a2a046aa71
commit
6fea7dee1c
@ -1,27 +1,18 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||
WORKDIR /src
|
||||
COPY . ./
|
||||
RUN dotnet restore
|
||||
|
||||
#COPY ["/src/AdventOfCode/AdventOfCode.csproj", "AdventOfCode/"]
|
||||
RUN dotnet restore "AdventOfCode.csproj"
|
||||
#COPY ["AdventOfCode/", "AdventOfCode/."]
|
||||
|
||||
# Copy csproj and restore as distinct layers
|
||||
|
||||
RUN dotnet build "AdventOfCode.csproj" -c Release -o /app/build
|
||||
COPY . ./
|
||||
RUN dotnet publish -c Release -o out
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "./AdventOfCode.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM base AS final
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build-env /app/out .
|
||||
ENV ASPNETCORE_ENVIRONMENT=Production
|
||||
ENV ASPNETCORE_URLS=http://+:80
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "AdventOfCode.dll"]
|
||||
ENTRYPOINT ["dotnet", "AdventOfCode.dll"]
|
||||
|
||||
|
Loading…
Reference in new issue