Skip to content

Commit

Permalink
Use distroless image for k6-runner
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
  • Loading branch information
JorTurFer authored Aug 22, 2023
1 parent 97e32ae commit 931cbe2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions k6-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ RUN GOOS="${TARGETOS}" GOARCH="${TARGETARCH}" xk6 build \
--with github.com/grafana/xk6-disruptor@latest \
--with github.com/JorTurFer/xk6-input-prometheus@latest

FROM alpine:3.18
RUN apk add --no-cache ca-certificates && \
adduser -D -u 65532 -g 65532 k6
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /tmp/k6 /usr/bin/k6
USER 65532
WORKDIR /home/k6
# 65532 is numeric for nonroot
USER 65532:65532

ENTRYPOINT ["k6"]

0 comments on commit 931cbe2

Please sign in to comment.