mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
simplify dockerfiles
This commit is contained in:
parent
fa2bca73b4
commit
a5a2aee5dc
2 changed files with 10 additions and 26 deletions
|
|
@ -1,18 +1,10 @@
|
|||
FROM microsoft/dotnet:2.2-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY FilterLists.Api/FilterLists.Api.csproj src/FilterLists.Api/
|
||||
COPY FilterLists.Services/FilterLists.Services.csproj src/FilterLists.Services/
|
||||
COPY FilterLists.Data/FilterLists.Data.csproj src/FilterLists.Data/
|
||||
RUN dotnet restore src/FilterLists.Api/FilterLists.Api.csproj
|
||||
COPY . .
|
||||
WORKDIR FilterLists.Api
|
||||
RUN dotnet build FilterLists.Api.csproj -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish FilterLists.Api.csproj -c Release -o /app
|
||||
FROM microsoft/dotnet:2.2-sdk AS publish
|
||||
COPY FilterLists.Api /FilterLists.Api
|
||||
COPY FilterLists.Data /FilterLists.Data
|
||||
COPY FilterLists.Services /FilterLists.Services
|
||||
RUN dotnet publish FilterLists.Api/FilterLists.Api.csproj -c Release -o /out
|
||||
|
||||
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app .
|
||||
COPY --from=publish /out .
|
||||
EXPOSE 5000
|
||||
ENTRYPOINT ["dotnet", "FilterLists.Api.dll"]
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
FROM microsoft/dotnet:2.2-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY FilterLists.Web/FilterLists.Web.csproj src/FilterLists.Web/
|
||||
RUN dotnet restore src/FilterLists.Web/FilterLists.Web.csproj
|
||||
COPY . .
|
||||
WORKDIR FilterLists.Web
|
||||
RUN dotnet build FilterLists.Web.csproj -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish FilterLists.Web.csproj -c Release -o /app
|
||||
FROM microsoft/dotnet:2.2-sdk AS publish
|
||||
COPY FilterLists.Web /FilterLists.Web
|
||||
RUN dotnet publish FilterLists.Web/FilterLists.Web.csproj -c Release -o /out
|
||||
|
||||
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app .
|
||||
COPY --from=publish /out .
|
||||
EXPOSE 5001
|
||||
ENTRYPOINT ["dotnet", "FilterLists.Web.dll"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue