Skip to content

Commit

Permalink
Dockerfile: Don't set USER
Browse files Browse the repository at this point in the history
Changing USER breaks standard GitHub actions which require root.
See https://docs.github.com/en/actions/sharing-automations/creating-actions/dockerfile-support-for-github-actions#user

As this is intended as a base image for testing environment which does not contain a maven repo, running tests as default doesn't make sense here, instead launch an interactive shell for the quattortest user.
  • Loading branch information
jrha committed Sep 4, 2024
1 parent 2f177b2 commit b34f91f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ 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 -iu quattortest

0 comments on commit b34f91f

Please sign in to comment.