1
0
Эх сурвалжийг харах

Merge pull request #1487 from keeganwitt/gradle

Document default user now root
yosifkit 6 жил өмнө
parent
commit
a0449b66a1
1 өөрчлөгдсөн 5 нэмэгдсэн , 3 устгасан
  1. 5 3
      gradle/content.md

+ 5 - 3
gradle/content.md

@@ -6,10 +6,12 @@
 
 # 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 <gradle-task>`
+`docker run --rm -u gradle -v "$PWD":/home/gradle/project -w /home/gradle/project %%IMAGE%% gradle <gradle-task>`
+
+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.