Skip to content

Commit

Permalink
Dockerfile: Don't change default USER, use sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
jrha committed Sep 4, 2024
1 parent 2f177b2 commit b5b015f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ RUN dnf install -y maven which rpm-build panc ncm-lib-blockdevices \

# quattor tests should not be run as root
RUN useradd --user-group --create-home --no-log-init --home-dir /quattor_test quattortest
USER quattortest
WORKDIR /quattor_test

# Default action on running the container is to run all tests
CMD . /usr/bin/mvn_test.sh && mvn_test
CMD sudo -u quattortest "bash -c . /usr/bin/mvn_test.sh && mvn_test"

0 comments on commit b5b015f

Please sign in to comment.