A Dockerfile describing an container capable of executing Groovy source files.
git clone https://github.com/docker-exec/groovy.git
docker build -t dexec/groovy .
In a directory containing a script e.g. foo.groovy, run:
docker run -t --rm \
-v $(pwd -P)/foo.groovy:/tmp/dexec/build/foo.groovy \
dexec/groovy foo.groovy
Arguments can be passed to the script using any of the following forms:
-a argument
--arg argument
--arg=argument
Each argument passed must be prefixed in this way, e.g.
docker run -t --rm \
-v $(pwd -P)/foo.groovy:/tmp/dexec/build/foo.groovy \
dexec/groovy foo.groovy \
--arg='hello world' \
--arg=foo \
--arg=bar
Content type
Image
Digest
sha256:c5df8c0f1…
Size
142.9 MB
Last updated
about 10 years ago
Requires Docker Desktop 4.37.1 or later.