Skip to content

Commit

Permalink
Build loadimpact/k6 image from grafana/k6
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewslotin committed Jun 19, 2023
1 parent ca27b28 commit a3a8a82
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ COPY . .
RUN apk --no-cache add git=~2
RUN CGO_ENABLED=0 go install -a -trimpath -ldflags "-s -w -X go.k6.io/k6/lib/consts.VersionDetails=$(date -u +"%FT%T%z")/$(git describe --tags --always --long --dirty)"

FROM alpine:3.17
# Runtime stage
FROM alpine:3.17 as release

# hadolint ignore=DL3018
RUN apk add --no-cache ca-certificates && \
adduser -D -u 12345 -g 12345 k6
Expand All @@ -13,3 +15,10 @@ COPY --from=builder /go/bin/k6 /usr/bin/k6
USER 12345
WORKDIR /home/k6
ENTRYPOINT ["k6"]

# Legacy loadimpact/k6 image
FROM release

COPY entrypoint-legacy.sh /usr/bin/

ENTRYPOINT ["/usr/bin/entrypoint-legacy.sh"]

0 comments on commit a3a8a82

Please sign in to comment.