redocly-cli
redocly-cli copied to clipboard
Unclear how to lint and bundle with Docker image
I want to lint, then bundle my OpenAPI file, as described here. The problem is that I use the Redocly Docker image, and when I use the described method, the command exits after it validates succesfully:
build-openapi-bundle-1 | No configurations were provided -- using built in recommended configuration by default.
build-openapi-bundle-1 |
build-openapi-bundle-1 | validating openapi/openapi.yml...
build-openapi-bundle-1 | openapi/openapi.yml: validated in 96ms
build-openapi-bundle-1 |
build-openapi-bundle-1 | Woohoo! Your API description is valid. 🎉
build-openapi-bundle-1 |
build-openapi-bundle-1 exited with code 0
The docker-compose.yml:
build-openapi-bundle:
image: redocly/cli
volumes:
- .:/data
working_dir: /data
command: lint ./openapi/openapi.yml && bundle ./openapi/openapi.yml --output openapi-bundle.yml
How do I use the flow described in the docs with Docker?
Hi @TeaDrinkingProgrammer , Could you please try to split lint and bundle into two separate services. Smth like
lint-openapi:
image: redocly/cli
volumes:
- .:/data
working_dir: /data
command: lint ./openapi/openapi.yml
bundle-openapi:
image: redocly/cli
volumes:
- .:/data
working_dir: /data
command: bundle ./openapi/openapi.yml --output openapi-bundle.yml
Closing because of a lack of response, we may assume this answered the question.