IMPALA-10373: Run impala docker containers with uid/gid 1000

The convention in in linux is to that anything below 1000 is reserved
for system accounts, services, and other special accounts, and
regular user UIDs and GIDs stay above 1000. This will ensure that the
'impala' user created that runs the impala executable inside the
docker container gets assigned 1000 uid and gid.

Testing:
Manually tested by running the docker container and checking the user.

Change-Id: I51b846ca5fb2c55ac1707b9581cee18447467b41
Reviewed-on: http://gerrit.cloudera.org:8080/16807
Reviewed-by: Andrew Sherman <asherman@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
Bikramjeet Vig
2020-12-01 18:54:36 -08:00
committed by Impala Public Jenkins
parent 579f5c67e0
commit 8542924fca

View File

@@ -28,7 +28,7 @@ RUN apt-get update && \
# Use a non-privileged impala user to run the daemons in the container.
# That user should own everything in the /opt/impala subdirectory.
RUN groupadd -r impala && useradd --no-log-init -r -g impala impala && \
RUN groupadd -r impala -g 1000 && useradd --no-log-init -r -u 1000 -g 1000 impala && \
mkdir -p /opt/impala && chown impala /opt/impala && \
chmod ugo+w /etc/passwd
USER impala