Hi Team,
I build a custome xk6 docker image with xk6-output-prometheus-remote with the below commands on my docker file
FROM golang:1.19-alpine as builder
WORKDIR $GOPATH/src/go.k6.io/k6
ADD . .
RUN apk --no-cache add build-base git
RUN go install go.k6.io/xk6/cmd/xk6@latest
RUN CGO_ENABLED=0 xk6 build \ –with GitHub - grafana/xk6-output-prometheus-remote: k6 extension to output real-time test metrics using Prometheus Remote Write. \ –output /tmp/k6
FROM alpine:3.16
RUN apk add --no-cache ca-certificates \ && adduser -D -u 12345 -g 12345 k6COPY --from=builder /tmp/k6 /usr/bin/k6
USER 12345WORKDIR /home/k6
ADD ./test-scripts/simple.js /home/k6/
ENTRYPOINT [“k6”]
While running a test through the docker-compose up command
command: run -o xk6-prometheus-rw /home/k6/simple.js
Getting an error
could not create the ‘xk6-prometheus-rw’ output: parse environment variables options failed
But running with
command: run /home/k6/simple.js
The test runs fine, but no data push to Prometheus.
Guide me.