forked from Kuadrant/mcp-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.k6
More file actions
35 lines (25 loc) · 1.17 KB
/
Copy pathDockerfile.k6
File metadata and controls
35 lines (25 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Build k6 with the xk6-infobip-mcp extension.
# The resulting image is published to ghcr.io/kuadrant/mcp-gateway/k6-mcp
# and used by the in-cluster performance benchmark Job.
#
# Build: docker build -f Dockerfile.k6 -t ghcr.io/kuadrant/mcp-gateway/k6-mcp:latest .
# Push: docker push ghcr.io/kuadrant/mcp-gateway/k6-mcp:latest
FROM golang:1.24-alpine AS builder
# Allow the Go toolchain to auto-download a newer version if a dependency
# requires one (e.g. xk6 >= v1.4 requires Go 1.25+).
# cspell:ignore GOTOOLCHAIN
ENV GOTOOLCHAIN=auto
RUN apk add --no-cache git
# Install xk6 – the k6 extension builder
RUN go install go.k6.io/xk6/cmd/xk6@v1.4.3
# Build k6 with the MCP extension
RUN xk6 build \
--with github.com/infobip/xk6-infobip-mcp \
--output /k6
# ─────────────────────────────────────────────────────────────────────────────
FROM alpine:3.20
RUN apk add --no-cache ca-certificates
RUN addgroup -S -g 101 k6 && adduser -S -u 100 -G k6 k6
COPY --from=builder /k6 /usr/local/bin/k6
USER k6
ENTRYPOINT ["k6"]