Alter the user ID of jenkins
This commit is contained in:
parent
cf5ae85df3
commit
66be568255
1 changed files with 6 additions and 2 deletions
|
@ -10,9 +10,13 @@ USER root
|
|||
WORKDIR /
|
||||
RUN wget "https://get.jenkins.io/war/$JENKINS_VERSION/jenkins.war"
|
||||
|
||||
RUN useradd -m -s /bin/bash -d /jenkins jenkins
|
||||
USER jenkins
|
||||
# Add a user ID 1000:1000
|
||||
RUN useradd -m -s /bin/bash fakeuser
|
||||
|
||||
# Jenkins expects ID 1001:1001
|
||||
RUN useradd -m -s /bin/bash -d /jenkins jenkins
|
||||
|
||||
USER jenkins
|
||||
WORKDIR /jenkins
|
||||
|
||||
ENTRYPOINT ["java", "-jar", "/jenkins.war"]
|
||||
|
|
Loading…
Reference in a new issue