forked from grafana/k6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multistage k6 Dockerfile, add code coverage
- Loading branch information
1 parent
d7aa28e
commit b65a5d0
Showing
26 changed files
with
5,649 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
FROM golang:1.9-alpine | ||
|
||
FROM golang:1.9-alpine as builder | ||
WORKDIR $GOPATH/src/github.com/loadimpact/k6 | ||
ADD . . | ||
RUN apk --no-cache add --virtual .build-deps make git build-base && \ | ||
go get . && go install . && rm -rf $GOPATH/pkg && \ | ||
apk del .build-deps | ||
RUN apk --no-cache add --virtual .build-deps git make build-base && \ | ||
go get . && CGO_ENABLED=0 go install -a -ldflags '-s -w' && \ | ||
go get github.com/GeertJohan/go.rice && \ | ||
cd $GOPATH/src/github.com/GeertJohan/go.rice/rice && \ | ||
go get . && go install && \ | ||
cd $GOPATH/src/github.com/loadimpact/k6 && \ | ||
rice append --exec=$GOPATH/bin/k6 -i ./js/compiler -i ./js/lib | ||
|
||
ENTRYPOINT ["k6"] | ||
FROM scratch | ||
WORKDIR /root/ | ||
COPY --from=builder /go/bin/k6 /root | ||
ENTRYPOINT ["./k6"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.