|
3 | 3 | Application Packages are generally deployed to cloud platforms, but there are |
4 | 4 | also ways to run CWL files and complete Application Packages locally. |
5 | 5 |
|
| 6 | +## Understanding and debugging xcengine container images |
| 7 | + |
| 8 | +When generating a container image, xcengine uses a |
| 9 | +[micromamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html) |
| 10 | +image as a base. If you need to investigate or |
| 11 | +debug an xcengine image, or if you're just curious about its structure, you may |
| 12 | +find the [micromamba-docker |
| 13 | +documentation](https://micromamba-docker.readthedocs.io/) useful. |
| 14 | + |
| 15 | +xcengine sets a custom entry point to run its own runner script, so any commands |
| 16 | +provided when running a container from an xcengine image with `docker run` |
| 17 | +will be applied as arguments to the xcengine runner. For instance, for an |
| 18 | +image tagged `myimage:1`, the `--server` parameter can be used like this: |
| 19 | + |
| 20 | +`docker run myimage:1 --server` |
| 21 | + |
| 22 | +This would run the xcengine runner script with the `--server` option, which |
| 23 | +starts an xcube server and viewer instance. |
| 24 | + |
| 25 | +To explore or debug a container image, it's often useful to start a container |
| 26 | +with an interactive shell. To do this with an xcengine image, it's not enough |
| 27 | +to provide a path to a shell as a command, since this path will just be passed |
| 28 | +as a parameter to the xcengine runner script. You need to set the entry point |
| 29 | +as well, like this: |
| 30 | + |
| 31 | +`docker --rm -it --entrypoint /usr/local/bin/_entrypoint.sh myimage:1 bash` |
| 32 | + |
| 33 | +This resets the entry point to the usual micromamba-docker entry point, which |
| 34 | +sets up the Python environment, then runs bash within that environment. |
| 35 | + |
6 | 36 | ## Running with cwltool |
7 | 37 |
|
8 | 38 | [cwltool](https://www.commonwl.org/user_guide/introduction/quick-start.html) |
|
0 commit comments