# Docker runner scripts

**URL:** <https://community.rubybench.org/t/docker-runner-scripts/166>\
**Category:** Uncategorized\
**Created:** [November 3, 2017, 8:59pm UTC](https://community.rubybench.org/t/docker-runner-scripts/166 "2017-11-03T20:59:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![noahgibbs](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rubybench.org/noahgibbs/32/91_2.png) [@noahgibbs](https://community.rubybench.org/u/noahgibbs)\
**Post date:** [November 3, 2017, 8:59pm UTC](https://community.rubybench.org/t/docker-runner-scripts/166/1 "2017-11-03T20:59:13Z")

</div>

There are a bunch of variables in the runner scripts that expect to be set. For instance, POSTGRES\_PORT\_5432\_TCP\_ADDR, REDIS\_PORT\_6379\_TCP\_PORT and RUBY\_VERSION.

Where/how do those usually get set? There are some, like DISCOURSE\_COMMIT\_HASH, that I can find. The others, not so much.

---

<div class="post-metadata">

**Author:** ![bmarkons](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rubybench.org/bmarkons/32/87_2.png) [@bmarkons](https://community.rubybench.org/u/bmarkons)\
**Post date:** [November 4, 2017, 6:38pm UTC](https://community.rubybench.org/t/docker-runner-scripts/166/2 "2017-11-04T18:38:00Z")

</div>

You can pass any env variable you need, for your benchmark run, to [docker run](https://docs.docker.com/engine/reference/commandline/run/) command:

```auto
docker run
 -e "RUBY_COMMIT_HASH=<ruby commit sha1>"
 -e "API_NAME=<API NAME>"
 -e "API_PASSWORD=<API PASSWORD>"
 ...

```

We use these then in runner scripts. If you need more variables you can pass them also.

_POSTGRES\_PORT\_5432\_TCP\_ADDR_ and _REDIS\_PORT\_6379\_TCP\_PORT_ are automatically set by docker when you link redis and postgres to our benchmark run container. That way it can access redis and postgres containers.
