Skip to content

Commit ef99d93

Browse files
authored
freshen output
match path clarify 'CWL' the standard vs 'CWL runner'
1 parent 45a7ac1 commit ef99d93

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

_episodes/07-containers.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ complete known-good runtime for software and its dependencies. However,
1717
containers are also purposefully isolated from the host system, so in
1818
order to run a tool inside a Docker container there is additional work to
1919
ensure that input files are available inside the container and output
20-
files can be recovered from the container. CWL can perform this work
20+
files can be recovered from the container. A CWL runner can perform this work
2121
automatically, allowing you to use Docker to simplify your software
2222
management while avoiding the complexity of invoking and managing Docker
2323
containers.
@@ -42,15 +42,31 @@ input object on the command line:
4242
```
4343
$ echo "console.log(\"Hello World\");" > hello.js
4444
$ cwl-runner docker.cwl docker-job.yml
45-
[job 140259721854416] /home/example$ docker run -i --volume=/home/example/hello.js:/var/lib/cwl/job369354770_examples/hello.js:ro --volume=/home/example:/var/spool/cwl:rw --volume=/tmp/tmpDLs5hm:/tmp:rw --workdir=/var/spool/cwl --read-only=true --net=none --user=1001 --rm --env=TMPDIR=/tmp node:slim node /var/lib/cwl/job369354770_examples/hello.js
46-
Hello world!
45+
[job docker.cwl] /tmp/tmpgugLND$ docker \
46+
run \
47+
-i \
48+
--volume=/tmp/tmpgugLND:/var/spool/cwl:rw \
49+
--volume=/tmp/tmpSs5JoN:/tmp:rw \
50+
--volume=/home/me/cwl/user_guide/hello.js:/var/lib/cwl/stg16848d97-e6ba-4b35-b666-4546d9965a2d/hello.js:ro \
51+
--workdir=/var/spool/cwl \
52+
--read-only=true \
53+
--user=1000 \
54+
--rm \
55+
--env=TMPDIR=/tmp \
56+
--env=HOME=/var/spool/cwl \
57+
node:slim \
58+
node \
59+
/var/lib/cwl/stg16848d97-e6ba-4b35-b666-4546d9965a2d/hello.js
60+
Hello World
61+
[job docker.cwl] completed success
62+
{}
4763
Final process status is success
4864
```
4965

5066
Notice the CWL runner has constructed a Docker command line to run the
5167
script. One of the responsibilities of the CWL runner is to adjust the paths of
5268
input files to reflect the location where they appear inside the container.
53-
In this example, the path to the script `hello.js` is `/home/example/hello.js`
69+
In this example, the path to the script `hello.js` is `/home/me/cwl/user_guide/hello.js`
5470
outside the container but `/var/lib/cwl/job369354770_examples/hello.js` inside
5571
the container, as reflected in the invocation of the `node` command.
5672

0 commit comments

Comments
 (0)