Document a `verify` script pattern
See original GitHub issueUpdate 2022 by Erik
My understanding is that we don’t look to implement a feature in repo2docker related to a pattern, but that we may wish to document ideas like this. An example to reference could be this from pangeo-stacks: https://github.com/jupyterhub/repo2docker/issues/93#issuecomment-502821794
Original post
I think for many people it’d be useful to run some simple tests whenever their r2d image is built. This is similar to postBuild
(and the same behavior could be done w/ a few assert statements at the end of one of these files), but I wonder if it’d be worth having a file that specifically has the job of “throw a tests aren't passing
error” so that the user knows their code isn’t working.
Alternatively, we could try to set guidelines for this in the documentation, basically include a section on how to ensure your container runs after it builds. Thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:20 (17 by maintainers)
Top GitHub Comments
@alando46 and I have been discussing this idea a bit in https://github.com/pangeo-data/pangeo/issues/544. Something users could do today is include a test suite in their repo and test a built image like this:
I suppose a generic
verify
interface would be useful as well if you wanted to add this as an option to repo2docker cli or binderhub in someway.FWIW, the
verify
script is what we started using in pangeo-stacks.