mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
dockerize Agent
This commit is contained in:
parent
095c37e7b1
commit
4497cab46b
3 changed files with 34 additions and 1 deletions
|
|
@ -32,7 +32,6 @@ LICENSE
|
|||
# FilterLists custom
|
||||
FilterLists.sln
|
||||
FilterLists.Api.sln
|
||||
src/FilterLists.Agent
|
||||
imgs
|
||||
ops
|
||||
data/TPLSubscriptionAssistant.html
|
||||
|
|
@ -56,6 +56,13 @@ services:
|
|||
"--collation-server=utf8mb4_unicode_520_ci"
|
||||
]
|
||||
|
||||
agent:
|
||||
image: collinbarrett/filterlists.agent:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/FilterLists.Agent/Dockerfile
|
||||
target: final
|
||||
|
||||
networks:
|
||||
reverse-proxy:
|
||||
api:
|
||||
|
|
|
|||
27
src/FilterLists.Agent/Dockerfile
Normal file
27
src/FilterLists.Agent/Dockerfile
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Context: .
|
||||
# Command: docker build -f src/FilterLists.Agent/Dockerfile .
|
||||
|
||||
# init base
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-alpine as base
|
||||
ENTRYPOINT ["dotnet", "FilterLists.Agent.dll"]
|
||||
WORKDIR /app
|
||||
|
||||
# init build
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine AS build
|
||||
|
||||
# restore
|
||||
WORKDIR /app/src/FilterLists.Agent
|
||||
COPY src/FilterLists.Agent/FilterLists.Agent.csproj .
|
||||
RUN dotnet restore
|
||||
|
||||
# build
|
||||
COPY src/FilterLists.Agent/. .
|
||||
RUN dotnet build -c Release --no-restore
|
||||
|
||||
# publish
|
||||
FROM build AS publish
|
||||
RUN dotnet publish -c Release -o out --no-restore --no-build
|
||||
|
||||
# final
|
||||
FROM base as final
|
||||
COPY --from=publish /app/src/FilterLists.Agent/out .
|
||||
Loading…
Reference in a new issue