You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,6 +170,22 @@ To modify the logging level you can update [`logging.properties`](src/main/resou
170
170
171
171
### How use with Docker
172
172
173
+
- Build or pull a dev image to help building from source:
174
+
175
+
```sh
176
+
./docker/benchbase/build-dev-image.sh
177
+
./docker/benchbase/run-dev-image.sh
178
+
```
179
+
180
+
or
181
+
182
+
```sh
183
+
docker run -it --rm --pull \
184
+
-v /path/to/benchbase-source:/benchbase \
185
+
-v $HOME/.m2:/home/containeruser/.m2 \
186
+
benchbase.azure.cr.io/benchbase-dev
187
+
```
188
+
173
189
- Build the full image:
174
190
175
191
```sh
@@ -186,7 +202,14 @@ To modify the logging level you can update [`logging.properties`](src/main/resou
186
202
BENCHBASE_PROFILE='postgres' ./docker/benchbase/run-full-image.sh --help # or other benchbase args as before
187
203
```
188
204
189
-
> See [scripts](./docker/benchbase/) for further details.
205
+
or
206
+
207
+
```sh
208
+
docker run -it --rm --env BENCHBASE_PROFILE='postgres' \
209
+
-v results:/benchbase/results benchbase.azurecr.io/benchbase --help # or other benchbase args as before
210
+
```
211
+
212
+
> See the [docker/benchbase/README.md](./docker/benchbase/) for further details.
190
213
191
214
[Github Codespaces](https://github.com/features/codespaces) and [VSCode devcontainer](https://code.visualstudio.com/docs/remote/containers) support is also available.
This directory provides scripts for producing and running two different containers.
4
+
5
+
## Building Containers
6
+
7
+
1.`benchbase-dev` which can be used for *building* and *developing*`benchbase`.
8
+
9
+
It contains a full JDK and is expected to be run with the local source code checkout mapped into it (e.g. `docker run -v $repo_root:/benchbase benchbase-dev`).
10
+
11
+
The [`.devcontainer.json`](../../.devcontainer/devcontainer.json) config references this one and can be used with [Github Codespaces](https://github.com/features/codespaces) or [VS Code dev containers](https://code.visualstudio.com/docs/remote/containers).
12
+
13
+
See [`build-dev-image.sh`](./build-dev-image.sh) and [`run-dev-image.sh`](./run-dev-image.sh) for further details.
14
+
15
+
2.`benchbase` which can be used for easily *running*`benchbase` in a container environment (e.g. via Kubernetes).
16
+
17
+
It contains just a JRE and can be used for running prebuilt profiles of `benchbase`.
18
+
19
+
The `benchbase-dev` image is used to produce the prebuilt profiles.
20
+
21
+
By default all profiles are built, though this can be controlled by setting the `BENCHBASE_PROFILES` environment variable to a specific subset of profiles when building the image with the `build-full-image.sh` script.
The test suite can also be skipped during the build phase by setting `SKIP_TESTS='true'`.
29
+
30
+
Additionally, an `benchbase-{profile_name}` image with just that profile in it will be created for each of the `BENCHBASE_PROFILES`.
31
+
32
+
When running the `benchbase` image, results are placed in`/benchbase/results`, which is expected to be mapped back into the host environment (e.g. `docker run -v /place/to/save/results:/benchbase/results benchbase`)
33
+
34
+
See [`build-full-image.sh`](./build-full-image.sh) and [`run-full-image.sh`](./run-full-image.sh) for further details.
35
+
36
+
### Publishing Containers
37
+
38
+
These scripts are used to publish the images to a container registry for easy consumption with `docker pull` as well.
39
+
40
+
If you would like to publish them to an alternative repository, you can setup the appropriate tags during the build by setting the `CONTAINER_REGISTRY_NAME` environment variable.
0 commit comments