Skip to content

Commit

Permalink
Revert "Replace uid/gid 1000 with 1001"
Browse files Browse the repository at this point in the history
This reverts commit 3d17462.
  • Loading branch information
keeganwitt committed Sep 27, 2024
1 parent 97edfe5 commit 150f9f6
Show file tree
Hide file tree
Showing 20 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Run this from the directory of the Gradle project you want to build.

`docker run --rm -u gradle -v "%cd%:/home/gradle/project" -w /home/gradle/project gradle:latest gradle <gradle-task>`

Note the above command runs using uid/gid 1001 (user *gradle*) to avoid running as root.
Note the above command runs using uid/gid 1000 (user *gradle*) to avoid running as root.

### Reusing the Gradle cache

Expand Down
4 changes: 2 additions & 2 deletions jdk-lts-and-current-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& addgroup --system --gid 1001 gradle \
&& adduser --system --ingroup gradle --uid 1001 --shell /bin/ash gradle \
&& addgroup --system --gid 1000 gradle \
&& adduser --system --ingroup gradle --uid 1000 --shell /bin/ash gradle \
&& mkdir /home/gradle/.gradle \
&& chown -R gradle:gradle /home/gradle \
\
Expand Down
4 changes: 2 additions & 2 deletions jdk-lts-and-current-graal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
\
&& echo "Symlinking root Gradle cache to gradle Gradle cache" \
Expand Down
4 changes: 2 additions & 2 deletions jdk-lts-and-current/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
\
Expand Down
4 changes: 2 additions & 2 deletions jdk11-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& addgroup --system --gid 1001 gradle \
&& adduser --system --ingroup gradle --uid 1001 --shell /bin/ash gradle \
&& addgroup --system --gid 1000 gradle \
&& adduser --system --ingroup gradle --uid 1000 --shell /bin/ash gradle \
&& mkdir /home/gradle/.gradle \
&& chown -R gradle:gradle /home/gradle \
&& chmod -R o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk11-focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod --recursive o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod --recursive o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk17-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& addgroup --system --gid 1001 gradle \
&& adduser --system --ingroup gradle --uid 1001 --shell /bin/ash gradle \
&& addgroup --system --gid 1000 gradle \
&& adduser --system --ingroup gradle --uid 1000 --shell /bin/ash gradle \
&& mkdir /home/gradle/.gradle \
&& chown -R gradle:gradle /home/gradle \
&& chmod -R o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk17-focal-graal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod --recursive o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk17-focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod --recursive o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk17-graal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod --recursive o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk17/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
\
Expand Down
4 changes: 2 additions & 2 deletions jdk21-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& addgroup --system --gid 1001 gradle \
&& adduser --system --ingroup gradle --uid 1001 --shell /bin/ash gradle \
&& addgroup --system --gid 1000 gradle \
&& adduser --system --ingroup gradle --uid 1000 --shell /bin/ash gradle \
&& mkdir /home/gradle/.gradle \
&& chown -R gradle:gradle /home/gradle \
&& chmod -R o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk21-graal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod -R o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk21/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod --recursive o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk23-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& addgroup --system --gid 1001 gradle \
&& adduser --system --ingroup gradle --uid 1001 --shell /bin/ash gradle \
&& addgroup --system --gid 1000 gradle \
&& adduser --system --ingroup gradle --uid 1000 --shell /bin/ash gradle \
&& mkdir /home/gradle/.gradle \
&& chown -R gradle:gradle /home/gradle \
&& chmod -R o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk23-graal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod -R o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk23/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod --recursive o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk8-focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod --recursive o+rwx /home/gradle \
Expand Down
4 changes: 2 additions & 2 deletions jdk8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV GRADLE_HOME /opt/gradle

RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1001 gradle \
&& useradd --system --gid gradle --uid 1001 --shell /bin/bash --create-home gradle \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod --recursive o+rwx /home/gradle \
Expand Down

0 comments on commit 150f9f6

Please sign in to comment.