Skip to content

Commit 6610738

Browse files
committed
Add docs on debugging container images
1 parent e372d9e commit 6610738

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Improve handling of environment file specification (#63)
44
* Stop running container on SIGINT (#62)
55
* `xcetool image run --server` prints server and viewer URLs (#46)
6-
* Improve documentation (#54)
6+
* Improve documentation (#54, #55)
77
* Improve type annotations and checks (#68)
88

99
## Changes in 0.1.1

docs/running-eoaps.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,36 @@
33
Application Packages are generally deployed to cloud platforms, but there are
44
also ways to run CWL files and complete Application Packages locally.
55

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+
636
## Running with cwltool
737

838
[cwltool](https://www.commonwl.org/user_guide/introduction/quick-start.html)

0 commit comments

Comments
 (0)