Skip to content

Commit

Permalink
Merge pull request #1314 from funkypenguin/use-non-root
Browse files Browse the repository at this point in the history
Use non-root user
  • Loading branch information
Ivan Mirić authored Jan 29, 2020
2 parents 9af6e75 + 660c926 commit 74f11a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ RUN apk --no-cache add git
RUN CGO_ENABLED=0 go install -a -trimpath -ldflags "-s -w -X github.com/loadimpact/k6/lib/consts.VersionDetails=$(date -u +"%FT%T%z")/$(git describe --always --long --dirty)"

FROM alpine:3.10
RUN apk add --no-cache ca-certificates
RUN apk add --no-cache ca-certificates && \
adduser -D -u 12345 -g 12345 k6
COPY --from=builder /go/bin/k6 /usr/bin/k6

USER 12345
ENTRYPOINT ["k6"]

0 comments on commit 74f11a6

Please sign in to comment.