added note about mounting volumes with uid other than 1000

This commit is contained in:
Keegan Witt 2017-08-30 00:16:35 -04:00
parent 0b7b91eea5
commit 54b4997f26
1 changed files with 6 additions and 4 deletions

View File

@ -6,21 +6,23 @@
# 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 --name groovy groovy:alpine`
`docker run -it --rm groovy:latest`
## Running a Groovy script
`docker run --rm -v "$PWD":/scripts -w /scripts --name groovy groovy:alpine groovy <script> <script-args>`
`docker run --rm -v "$PWD":/home/groovy/scripts -w /home/groovy/scripts groovy:latest 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*.
The local Grapes cache can be reused across containers by creating a volume and mounting it in _/home/groovy/.groovy/grapes_.
```console
docker volume create --name grapes-cache
docker run -it -v grapes-cache:/home/groovy/.groovy/grapes groovy:alpine
docker run --rm -it -v grapes-cache:/home/groovy/.groovy/grapes groovy:latest
```
**Note: Java 9 support is experimental**