Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vulnerability of Docker image #43

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ADD . .
RUN apk --no-cache add build-base git
RUN go install go.k6.io/xk6/cmd/xk6@latest
RUN CGO_ENABLED=1 xk6 build \
--replace golang.org/x/net=golang.org/x/net@latest \
--with github.com/grafana/xk6-sql=. \
--output /tmp/k6

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ Then:

2. Build the binary:
```shell
xk6 build --with github.com/grafana/xk6-sql
xk6 build --replace golang.org/x/net=golang.org/x/net@latest --with github.com/grafana/xk6-sql
```

If you're using SQLite, ensure you have a C compiler installed (see the
prerequisites note) and set `CGO_ENABLED=1` in the environment:
```shell
CGO_ENABLED=1 xk6 build --with github.com/grafana/xk6-sql
CGO_ENABLED=1 xk6 build --replace golang.org/x/net=golang.org/x/net@latest --with github.com/grafana/xk6-sql
```

On Windows this is done slightly differently:
```shell
set CGO_ENABLED=1
xk6 build --with github.com/grafana/xk6-sql
xk6 build --replace golang.org/x/net=golang.org/x/net@latest --with github.com/grafana/xk6-sql
```

## Development
Expand Down