From 5cc6064e1146bf4f7b043697fc2bd88897891f15 Mon Sep 17 00:00:00 2001 From: Kpa-clawbot <259247574+Kpa-clawbot@users.noreply.github.com> Date: Sat, 28 Mar 2026 13:36:37 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20Dockerfile=20.git-commit=20COPY=20fails?= =?UTF-8?q?=20on=20legacy=20builder=20=E2=80=94=20use=20RUN=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The glob trick COPY .git-commi[t] only works with BuildKit. manage.sh uses legacy docker build. Just create a default via RUN. Commit hash comes through --build-arg ldflags anyway. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 427a5d4..9920a10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,9 +34,9 @@ COPY --from=builder /meshcore-server /meshcore-ingestor /app/ COPY public/ ./public/ COPY config.example.json channel-rainbow.json ./ -# Bake git commit SHA (CI writes .git-commit before build; fallback for non-ldflags usage) -COPY .git-commi[t] ./ -RUN if [ ! -f .git-commit ]; then echo "unknown" > .git-commit; fi +# Bake git commit SHA — manage.sh and CI write .git-commit before build +# Default to "unknown" if not provided +RUN echo "unknown" > .git-commit # Supervisor + Mosquitto + Caddy config COPY docker/supervisord-go.conf /etc/supervisor/conf.d/supervisord.conf