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 /
|
WORKDIR /
|
||||||
RUN wget "https://get.jenkins.io/war/$JENKINS_VERSION/jenkins.war"
|
RUN wget "https://get.jenkins.io/war/$JENKINS_VERSION/jenkins.war"
|
||||||
|
|
||||||
RUN useradd -m -s /bin/bash -d /jenkins jenkins
|
# Add a user ID 1000:1000
|
||||||
USER jenkins
|
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
|
WORKDIR /jenkins
|
||||||
|
|
||||||
ENTRYPOINT ["java", "-jar", "/jenkins.war"]
|
ENTRYPOINT ["java", "-jar", "/jenkins.war"]
|
||||||
|
|
Loading…
Reference in a new issue