Estimated reading time: 3 minutes

Apache Groovy is a multi-faceted language for the Java platform.

GitHub repo:

Library reference

This content is imported from the official Docker Library docs, and is provided by the original uploader. You can view the Docker Hub page for this image at

Supported tags and respective Dockerfile links

Quick reference

What is Groovy?

Apache Groovy is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax. It integrates smoothly with any Java program, and immediately delivers to your application powerful features, including scripting capabilities, Domain-Specific Language authoring, runtime and compile-time meta-programming and functional programming.


How to use this image

Note that if you are mounting a volume and the uid running Docker is not 1000, you should run as user root (-u root).

Starting Groovysh

docker run -it --rm groovy

Running a Groovy script

docker run --rm -v "$PWD":/home/groovy/scripts -w /home/groovy/scripts groovy groovy <script> <script-args>

Reusing the Grapes cache

The local Grapes cache can be reused across containers by creating a volume and mounting it in /home/groovy/.groovy/grapes.

docker volume create --name grapes-cache
docker run --rm -it -v grapes-cache:/home/groovy/.groovy/grapes groovy


View license information for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository’s groovy/ directory.

As for any pre-built image usage, it is the image user’s responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

library, sample, groovy