From d80c1eab813a625ba6fe8441f1394cf1644a3a0e Mon Sep 17 00:00:00 2001 From: Khwezi Mngoma Date: Sat, 6 Jun 2026 00:29:49 +0200 Subject: [PATCH] FORCE BuildKit to use the host network interface to clear DNS/handshake resolution --- src/LiteCharmsSecurity.Admin.Api/Dockerfile | 2 +- src/LiteCharmsSecurity.Admin/Dockerfile | 2 +- src/LiteCharmsSecurity.STS.Identity/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LiteCharmsSecurity.Admin.Api/Dockerfile b/src/LiteCharmsSecurity.Admin.Api/Dockerfile index 02f352d..17e47a4 100644 --- a/src/LiteCharmsSecurity.Admin.Api/Dockerfile +++ b/src/LiteCharmsSecurity.Admin.Api/Dockerfile @@ -9,7 +9,7 @@ WORKDIR /app_source COPY . . -RUN dotnet restore "LiteCharmsSecurity.sln" +RUN --network=host dotnet restore "LiteCharmsSecurity.sln" WORKDIR "/app_source/src/LiteCharmsSecurity.Admin.Api" RUN dotnet build "LiteCharmsSecurity.Admin.Api.csproj" -c Release -o /app/build diff --git a/src/LiteCharmsSecurity.Admin/Dockerfile b/src/LiteCharmsSecurity.Admin/Dockerfile index 8a2103c..2e8232d 100644 --- a/src/LiteCharmsSecurity.Admin/Dockerfile +++ b/src/LiteCharmsSecurity.Admin/Dockerfile @@ -19,7 +19,7 @@ RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \ COPY . . -RUN dotnet restore "LiteCharmsSecurity.sln" +RUN --network=host dotnet restore "LiteCharmsSecurity.sln" WORKDIR "/app_source/src/LiteCharmsSecurity.Admin" RUN dotnet build "LiteCharmsSecurity.Admin.csproj" -c Release -o /app/build diff --git a/src/LiteCharmsSecurity.STS.Identity/Dockerfile b/src/LiteCharmsSecurity.STS.Identity/Dockerfile index 14c2a35..5b707f4 100644 --- a/src/LiteCharmsSecurity.STS.Identity/Dockerfile +++ b/src/LiteCharmsSecurity.STS.Identity/Dockerfile @@ -11,7 +11,7 @@ WORKDIR /app_source COPY . . # Restore the solution from the root context -RUN dotnet restore "LiteCharmsSecurity.sln" +RUN --network=host dotnet restore "LiteCharmsSecurity.sln" # Paths match your repository exactly now: src/ is just under the root WORKDIR "/app_source/src/LiteCharmsSecurity.STS.Identity"