From 2614433b9a28e34ac31057e500cc8b726f9138d4 Mon Sep 17 00:00:00 2001 From: mlsmaycon Date: Wed, 12 Aug 2026 06:12:53 +0000 Subject: [PATCH] [infrastructure] Make the client entrypoint executable regardless of the context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The client image copied the entrypoint with a bare COPY, so its mode came from whatever the build context held. In a git checkout that is 100755 and the image works. Building from this module's extracted copy in the module cache — which is what a suite in another module now does — every file is 0444, because the cache drops the executable bit, and the container dies on startup with exec: "/usr/local/bin/netbird-entrypoint.sh": permission denied Copy it with --chmod=0755 instead, so the mode is stated rather than inherited. The proxy Dockerfile already does this for /certs, and the build already requires BuildKit. Found by running the terraform provider's suite against images built this way: the combined server and the proxy came up, and every test needing an agent failed on the entrypoint. --- e2e/harness/Dockerfile.client | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/e2e/harness/Dockerfile.client b/e2e/harness/Dockerfile.client index 114577d60..74a3ec245 100644 --- a/e2e/harness/Dockerfile.client +++ b/e2e/harness/Dockerfile.client @@ -20,5 +20,9 @@ ENV NETBIRD_BIN="/usr/local/bin/netbird" \ NB_ENABLE_CAPTURE="false" \ NB_ENTRYPOINT_SERVICE_TIMEOUT="30" ENTRYPOINT [ "/usr/local/bin/netbird-entrypoint.sh" ] -COPY client/netbird-entrypoint.sh /usr/local/bin/netbird-entrypoint.sh +# --chmod because the build context is not always a git checkout. A suite in +# another module builds from this module's extracted copy in the module cache, +# where every file is 0444 — the cache drops the executable bit git records — and +# a bare COPY then produces an entrypoint the runtime cannot exec. +COPY --chmod=0755 client/netbird-entrypoint.sh /usr/local/bin/netbird-entrypoint.sh COPY --from=builder /out/netbird /usr/local/bin/netbird