Skip to content

Commit 5b5d3e8

Browse files
committed
Update instructions
1 parent a403715 commit 5b5d3e8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,18 @@ Docker image to run [kscript](https://github.com/holgerbrandl/kscript) (Kotlin s
66

77
The image is labelled with the same version number as kscript, with the underlying dependencies as updated as possible.
88

9-
The base image is Alpine, with Java, Maven, Kotlin and kscript installed with [SDKMAN!](https://sdkman.io/).
9+
The base image is Ubuntu, with Java, Maven, Kotlin and kscript installed with [SDKMAN!](https://sdkman.io/).
10+
11+
## Usage with inline code
12+
13+
`docker run -i serandel/kscript 'println("Hello, world!")'`
14+
15+
## Usage with a script from outside the container
16+
17+
`docker run -i serandel/kscript - < script.kts`
18+
19+
This will make kscript read the code from `stdin` while piping the file. Beware that the `-i` flag is needed to have `stdout` redirected outside the container.
20+
21+
## Volume
22+
23+
A volume is created for `/root/.kscript` so the JARs are cached between different invocations to containers.

0 commit comments

Comments
 (0)