From b302cd01067cf6a8d71d8a41e5ee6de7f825a3df Mon Sep 17 00:00:00 2001 From: Keegan Witt Date: Wed, 29 May 2019 19:27:13 -0400 Subject: [PATCH 1/2] Document default user now root --- gradle/content.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gradle/content.md b/gradle/content.md index 824de9309..8094d80a7 100644 --- a/gradle/content.md +++ b/gradle/content.md @@ -6,10 +6,13 @@ # 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`). - ## Building a Gradle project Run this from the directory of the Gradle project you want to build. -`docker run --rm -v "$PWD":/home/gradle/project -w /home/gradle/project %%IMAGE%% gradle ` +`docker run --rm -u gradle -v "$PWD":/home/gradle/project -w /home/gradle/project %%IMAGE%% gradle ` + +Note the above command runs using uid/gid 1000 (user _gradle_) to avoid running as root. + +If you are mounting a volume and the uid/gid running Docker is not _1000_, you should run as user _root_ (`-u root`). +_root_ is also the default, so you can also simply not specify a user. From 4c38952d01c3ece4f7ed170247ef78b433990375 Mon Sep 17 00:00:00 2001 From: Keegan Witt Date: Thu, 30 May 2019 20:59:58 -0400 Subject: [PATCH 2/2] Formatting fixes --- gradle/content.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gradle/content.md b/gradle/content.md index 8094d80a7..61fd065d2 100644 --- a/gradle/content.md +++ b/gradle/content.md @@ -12,7 +12,6 @@ Run this from the directory of the Gradle project you want to build. `docker run --rm -u gradle -v "$PWD":/home/gradle/project -w /home/gradle/project %%IMAGE%% gradle ` -Note the above command runs using uid/gid 1000 (user _gradle_) to avoid running as root. +Note the above command runs using uid/gid 1000 (user *gradle*) to avoid running as root. -If you are mounting a volume and the uid/gid running Docker is not _1000_, you should run as user _root_ (`-u root`). -_root_ is also the default, so you can also simply not specify a user. +If you are mounting a volume and the uid/gid running Docker is not *1000*, you should run as user *root* (`-u root`). *root* is also the default, so you can also simply not specify a user.