From b2a61a0238bce5a214daf9d6c8f8380f887ec0cd Mon Sep 17 00:00:00 2001 From: Jeremy Foster Date: Thu, 21 Nov 2024 10:34:50 -0800 Subject: [PATCH] Add local nuget to docker (#2339) --- services/net/contentmigration/Dockerfile | 2 ++ services/net/contentmigration/NuGet.Config | 6 ++++++ services/net/nlp/Dockerfile | 1 + services/net/nlp/NuGet.Config | 6 ++++++ 4 files changed, 15 insertions(+) create mode 100644 services/net/contentmigration/NuGet.Config create mode 100644 services/net/nlp/NuGet.Config diff --git a/services/net/contentmigration/Dockerfile b/services/net/contentmigration/Dockerfile index c77a5bec8d..4bb0fd3c12 100644 --- a/services/net/contentmigration/Dockerfile +++ b/services/net/contentmigration/Dockerfile @@ -11,6 +11,7 @@ USER 0 WORKDIR /src +COPY ../../../libs/net/packages /root/.nuget/packages COPY services/net/contentmigration services/net/contentmigration COPY libs/net libs/net @@ -18,6 +19,7 @@ RUN fix_permissions() { while [ $# -gt 0 ] ; do chgrp -R 0 "$1" && chmod -R g=u fix_permissions "/tmp" WORKDIR /src/services/net/contentmigration +RUN dotnet restore RUN dotnet build -c $ASPNETCORE_ENVIRONMENT -o /build FROM mcr.microsoft.com/dotnet/aspnet:9.0 as deploy diff --git a/services/net/contentmigration/NuGet.Config b/services/net/contentmigration/NuGet.Config new file mode 100644 index 0000000000..fa7f4cf518 --- /dev/null +++ b/services/net/contentmigration/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + diff --git a/services/net/nlp/Dockerfile b/services/net/nlp/Dockerfile index 0b367b726b..a9f42915f9 100644 --- a/services/net/nlp/Dockerfile +++ b/services/net/nlp/Dockerfile @@ -11,6 +11,7 @@ USER 0 WORKDIR /src +COPY ../../../libs/net/packages /root/.nuget/packages COPY services/net/nlp services/net/nlp COPY libs/net libs/net diff --git a/services/net/nlp/NuGet.Config b/services/net/nlp/NuGet.Config new file mode 100644 index 0000000000..fa7f4cf518 --- /dev/null +++ b/services/net/nlp/NuGet.Config @@ -0,0 +1,6 @@ + + + + + +