Alter the user ID of jenkins

This commit is contained in:
zontreck 2024-11-13 00:30:16 -07:00
parent cf5ae85df3
commit 66be568255

View file

@ -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"]