Skip to content

Commit

Permalink
Update README.md with image instructions
Browse files Browse the repository at this point in the history
Updates README.md to inform how to run with the goliothiot/xk6-coap
image.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
  • Loading branch information
hasheddan committed Jun 30, 2023
1 parent 7b28738 commit 811a5d8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@

## Getting Started

To get started, either build the `k6` binary or use the
[`goliothiot/xk6-coap`](https://hub.docker.com/repository/docker/goliothiot/xk6-coap)
image.

### Using the OCI Image

The quickest way to get started is by using the `goliothiot/xk6-coap` image,
which is [built](./images/xk6-coap/Dockerfile) from this repository and
published to DockerHub. Tests can be supplied when creating a container from the
image via a [bind mount](https://docs.docker.com/storage/bind-mounts/). For
example, the following command would run the [simple
example](./examples/simple.js) from this repository.

```
docker run -it --rm -v $(pwd)/examples/simple.js:/simple.js goliothiot/xk6-coap k6 run /simple.js --vus 10 --duration 5s
```

### Building a k6 Binary

Using `k6` extentions requires including the extension(s) in a `k6` build. The
[`xk6`](https://github.com/grafana/xk6) tool will handle executing the build,
and the `Makefile` in this repository will ensure that `xk6` is installed and
Expand Down

0 comments on commit 811a5d8

Please sign in to comment.