fix: Dockerfile .git-commit COPY fails on legacy builder — use RUN default

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>
This commit is contained in:
Kpa-clawbot
2026-03-28 13:36:37 -07:00
parent b326e3f1a6
commit 5cc6064e11

View File

@@ -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