From 6dc8f97ff9043f0ea299adda0b02b651d7ba375c Mon Sep 17 00:00:00 2001 From: Shannon Price Date: Thu, 13 Aug 2026 12:14:38 -0500 Subject: [PATCH] build: add Invoca Dockerfile and Buildkite pipeline Self-contained multi-stage Dockerfile.invoca (Go 1.26 compile + busybox runtime) and Buildkite pipeline that pushes to invocaops/prometheus with commit SHA and branch-safe tags via buildkit-daemonless. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Shannon Price --- .buildkite/pipeline.yml | 20 ++++++++++++++++++++ Dockerfile.invoca | 22 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .buildkite/pipeline.yml create mode 100644 Dockerfile.invoca diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml new file mode 100644 index 00000000000..82140b0f771 --- /dev/null +++ b/.buildkite/pipeline.yml @@ -0,0 +1,20 @@ +--- +IMAGE_NAME: &IMAGE_NAME invocaops/prometheus + +steps: + - label: ":docker: Image Build & Push" + timeout_in_minutes: 30 + env: + IMAGE_NAME: *IMAGE_NAME + agents: + queue: buildkit-daemonless + buildkit: true + daemonless: true + command: > + buildctl-daemonless build + --output type=image,"name=$IMAGE_NAME:$BUILDKITE_COMMIT,$IMAGE_NAME:$BUILDKITE_BRANCH_DOCKER_SAFE",push=true + --progress plain + --frontend dockerfile.v0 + --opt filename=Dockerfile.invoca + --local context=. + --local dockerfile=. diff --git a/Dockerfile.invoca b/Dockerfile.invoca new file mode 100644 index 00000000000..ba480340fbd --- /dev/null +++ b/Dockerfile.invoca @@ -0,0 +1,22 @@ +FROM golang:1.26 AS compile +RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ + && apt-get install -yq nodejs build-essential +WORKDIR /build +COPY . . +RUN make build + +FROM quay.io/prometheus/busybox-linux-amd64:latest +COPY --from=compile /build/prometheus /bin/prometheus +COPY --from=compile /build/promtool /bin/promtool +COPY --from=compile /build/documentation/examples/prometheus.yml /etc/prometheus/prometheus.yml +COPY --from=compile /build/consoles/ /usr/share/prometheus/consoles/ +COPY --from=compile /build/console_libraries/ /usr/share/prometheus/console_libraries/ +WORKDIR /prometheus +RUN ln -s /usr/share/prometheus/console_libraries /usr/share/prometheus/consoles/ /etc/prometheus/ && \ + chown -R nobody:nobody /etc/prometheus /prometheus +USER nobody +EXPOSE 9090 +VOLUME [ "/prometheus" ] +ENTRYPOINT [ "/bin/prometheus" ] +CMD [ "--config.file=/etc/prometheus/prometheus.yml", \ + "--storage.tsdb.path=/prometheus" ]