aboutsummaryrefslogtreecommitdiffstats
path: root/docker/core/Dockerfile
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2022-10-21 10:46:31 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2022-10-21 11:08:05 +0200
commit475a213a92b9f11b3c7206531e7c7358bb1fe4b4 (patch)
tree51f158275131a05f7f09f802349100a901e90488 /docker/core/Dockerfile
parent154a9c9ad66abbd57f971dc27c909cd7f7256b5a (diff)
Stop using root in testing containers
It now creates and leverages xtesting as main user. Change-Id: I5b871ac2729a875674514aab75ae079e1bf125f5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit b1e22e37cc436451b3519a0ef7f9704b5a86f9cc)
Diffstat (limited to 'docker/core/Dockerfile')
-rw-r--r--docker/core/Dockerfile3
1 files changed, 3 insertions, 0 deletions
diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile
index 03b88b41..5bd57dcb 100644
--- a/docker/core/Dockerfile
+++ b/docker/core/Dockerfile
@@ -40,7 +40,10 @@ RUN apk -U upgrade && \
printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
mkdir -p /var/lib/rally/database && rally db create && \
rm -r /src/requirements/.git /tmp/Try-a-quick-fix-vs-asynchronuous-issues.patch && \
+ addgroup -g 1000 xtesting && adduser -u 1000 -G xtesting -D xtesting && \
+ mkdir -p /etc/xtesting && chown -R xtesting: /etc/xtesting && \
apk del .build-deps
+USER xtesting
COPY logging.ini /etc/xtesting/logging.ini
COPY logging.debug.ini /etc/xtesting/logging.debug.ini
CMD ["run_tests", "-t", "all"]