aboutsummaryrefslogtreecommitdiffstats
path: root/docker/core
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 10:55:46 +0200
commitb1e22e37cc436451b3519a0ef7f9704b5a86f9cc (patch)
treebc5569b1114576adb855b1fdbcf84a870a90e44f /docker/core
parentb3bb826fcc018791d92b546589d7044fea637ce9 (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>
Diffstat (limited to 'docker/core')
-rw-r--r--docker/core/Dockerfile3
1 files changed, 3 insertions, 0 deletions
diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile
index 9f1e489f..eefc0da8 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"]