Open jb-adams opened 2 years ago
solution for #82
@jb-adams This is a nice way to build the to dockerize the image.
make docker-build
I can see the help menu
$ docker run -it --rm ga4gh/gh-openapi-docs:0.2.2-rc3 --help
Usage: bundle [options]
Options:
-V, --version output the version number
-c --config <config> Path to local configuration options [default: ".spec-docs.json"] (default: ".spec-docs.json")
-d --dry-run [bool] Do not touch or write anything, but show the commands (default: false)
-v --verbose [bool] Verbose output (default: false)
-h, --help output usage information
I tried to run the tool using the following command but without success. Do you see what I may doing wrong? Adding an example to the README could help.
$ docker run -it --rm -v ${PWD}:/project \
> ga4gh/gh-openapi-docs:0.2.2-rc3 \
> --dry-run true \
> -c /project/.spec-docs.json.sample.2
node:internal/validators:119
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
at new NodeError (node:internal/errors:371:5)
at validateString (node:internal/validators:119:11)
at Object.join (node:path:1172:7)
at constructBranchPath (webpack:///./src/lib/config.js?:40:56)
at eval (webpack:///./src/lib/config.js?:45:15)
at Module../src/lib/config.js (/snapshot/dist/bundle.js)
at __webpack_require__ (/snapshot/dist/bundle.js)
at eval (webpack:///./src/lib/tasks.js?:3:65)
at Module../src/lib/tasks.js (/snapshot/dist/bundle.js)
at __webpack_require__ (/snapshot/dist/bundle.js) {
code: 'ERR_INVALID_ARG_TYPE'
}
where I replaced the content of /project/.spec-docs.json.sample.2
so that the value of apiSpecPath
starts with the name of the docker volume I'm mounting (/project
).
{
"buildPages": [
{
"apiSpecPath": "/project/test/test-spec/combined/openapi.yaml",
"htmlOutfile": "index.html",
"yamlOutfile": "openapi.yaml",
"jsonOutfile": "openapi.json"
}
],
"redocTheme": "ga4gh"
}
An improvement would be to run the tool as a non-root user, e.g. using gosu
.
@jb-adams I'm having an issue running the dockerized tool (see above). Do you know what the issue may be?
Dockerfile to execute docs build in CI via docker container. Currently registered on docker hub