mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
prefer alpine containers for smaller size
This commit is contained in:
parent
b78c1d3615
commit
1a70a545eb
4 changed files with 9 additions and 10 deletions
|
|
@ -26,4 +26,4 @@ services:
|
|||
context: ./src
|
||||
dockerfile: ./FilterLists.Web/Dockerfile
|
||||
expose:
|
||||
- '5001'
|
||||
- '5001'
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
FROM nginx
|
||||
FROM nginx:mainline-alpine
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
FROM microsoft/dotnet:2.2-sdk AS publish
|
||||
FROM microsoft/dotnet:2.2-sdk-alpine 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
|
||||
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine AS final
|
||||
COPY --from=publish /out .
|
||||
ENV ASPNETCORE_URLS http://+:5000
|
||||
EXPOSE 5000
|
||||
ENTRYPOINT ["dotnet", "FilterLists.Api.dll"]
|
||||
ENTRYPOINT ["dotnet", "FilterLists.Api.dll"]
|
||||
|
|
@ -1,11 +1,10 @@
|
|||
FROM microsoft/dotnet:2.2-sdk AS publish
|
||||
FROM microsoft/dotnet:2.2-sdk-alpine AS publish
|
||||
COPY FilterLists.Web /FilterLists.Web
|
||||
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
|
||||
&& apt-get install -y nodejs \
|
||||
RUN apk add --update nodejs nodejs-npm \
|
||||
&& dotnet publish FilterLists.Web/FilterLists.Web.csproj -c Release -o /out
|
||||
|
||||
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS final
|
||||
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine AS final
|
||||
COPY --from=publish /out .
|
||||
ENV ASPNETCORE_URLS http://+:5001
|
||||
EXPOSE 5001
|
||||
ENTRYPOINT ["dotnet", "FilterLists.Web.dll"]
|
||||
ENTRYPOINT ["dotnet", "FilterLists.Web.dll"]
|
||||
Loading…
Reference in a new issue