From 5b268711432d9330ec01f2aa9d0e801e10d406f2 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Tue, 16 Jul 2019 08:11:36 -0500 Subject: [PATCH] test self-contained deployment --- src/FilterLists.Agent/Dockerfile | 9 +++++---- src/FilterLists.Agent/FilterLists.Agent.csproj | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/FilterLists.Agent/Dockerfile b/src/FilterLists.Agent/Dockerfile index 926a2ec6a..3cce8f70f 100644 --- a/src/FilterLists.Agent/Dockerfile +++ b/src/FilterLists.Agent/Dockerfile @@ -2,8 +2,8 @@ # Command: docker build -f src/FilterLists.Agent/Dockerfile . # init base -FROM mcr.microsoft.com/dotnet/core/runtime:2.2-alpine as base -ENTRYPOINT ["dotnet", "FilterLists.Agent.dll"] +FROM mcr.microsoft.com/dotnet/core/runtime-deps:2.2-alpine as base +ENTRYPOINT ["./FilterLists.Agent"] WORKDIR /app # init build @@ -16,7 +16,8 @@ RUN dotnet restore # build COPY src/FilterLists.Agent/. . -RUN dotnet build -c Release --no-restore +RUN dotnet add package ILLink.Tasks -v 0.1.5-preview-1841731 -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json +RUN dotnet build -c Release -r linux-musl-x64 -o out --no-restore # init Agent.Tests FROM build AS test-agent @@ -33,7 +34,7 @@ RUN dotnet build -c Release --no-restore # publish FROM build AS publish -RUN dotnet publish -c Release -o out --no-restore --no-build +RUN dotnet publish -c Release -r linux-musl-x64 -o out --no-restore --no-build # final FROM base as final diff --git a/src/FilterLists.Agent/FilterLists.Agent.csproj b/src/FilterLists.Agent/FilterLists.Agent.csproj index 7a65dbcf8..c3a334efc 100644 --- a/src/FilterLists.Agent/FilterLists.Agent.csproj +++ b/src/FilterLists.Agent/FilterLists.Agent.csproj @@ -1,11 +1,18 @@  + 8.0 + enable Exe netcoreapp2.2 true - 8.0 - enable + linux-musl-x64 + false + --additionalProbingPath /root/.nuget/fallbackpackages2 --additionalProbingPath /root/.nuget/fallbackpackages "bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).dll" -a -v + /usr/bin/dotnet + + + Collin M. Barrett Collin M. Barrett FilterLists @@ -16,9 +23,6 @@ https://github.com/collinbarrett/FilterLists git https://filterlists.com/ - false - --additionalProbingPath /root/.nuget/fallbackpackages2 --additionalProbingPath /root/.nuget/fallbackpackages "bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).dll" -a -v - /usr/bin/dotnet @@ -29,6 +33,10 @@ FilterLists.Agent.ruleset + + + +