Skip to content

Commit

Permalink
Add local nuget to docker (#2339)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fosol authored Nov 21, 2024
1 parent b9460e9 commit b2a61a0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions services/net/contentmigration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ USER 0

WORKDIR /src

COPY ../../../libs/net/packages /root/.nuget/packages
COPY services/net/contentmigration services/net/contentmigration
COPY libs/net libs/net

RUN fix_permissions() { while [ $# -gt 0 ] ; do chgrp -R 0 "$1" && chmod -R g=u "$1"; shift; done } && \
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
Expand Down
6 changes: 6 additions & 0 deletions services/net/contentmigration/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="local-packages" value="/root/.nuget/packages" />
</packageSources>
</configuration>
1 change: 1 addition & 0 deletions services/net/nlp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions services/net/nlp/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="local-packages" value="/root/.nuget/packages" />
</packageSources>
</configuration>

0 comments on commit b2a61a0

Please sign in to comment.