@jbr-hook/docker
v6.0.0
Published
Docker-based hook handler for JBR
Readme
JBR Hook - CLI
A jbr hook type for a Docker-based hook.
Requirements
Configure an experiment hook
If an experiment requires a hook, then you can install this Docker-based hook as follows.
$ jbr set-hook someHook dockerOutput
output/logs/docker-stdout.txt: Logs of stdout.
output/logs/docker-stderr.txt: Logs of stderr.
Configuration
When installing this hook, your configuration file (jbr-experiment.json) will contain the following:
...
"someHook": {
"@id": "urn:jrb:bb:hookSome",
"@type": "HookDocker",
"dockerfile": "input/dockerfiles/Dockerfile",
"resourceConstraints": {
"@type": "StaticDockerResourceConstraints",
"cpu_percentage": 100,
},
"additionalBinds": [],
"additionalBindsPrepare": [],
"innerPort": 3000,
"outerPort": 3000,
}
...Configuration fields
dockerfile: Path to the dockerfile to build and run.resourceConstraints: Resource constraints for the Docker container.additionalBinds: The local file bindings to the client dockerfile, e.g.generated/dataset.hdt.index.v1-1:/tmp/dataset.hdt.index.v1-1additionalBindsPrepare: Path to be passed to the image while building, e.g.input/file.jsinnerPortThe port within the container to expose.outerPortThe port on the local machine to bind to.
License
jbr.js is written by Ruben Taelman.
This code is copyrighted by Ghent University – imec and released under the MIT license.
