mirror of
https://github.com/InsanusMokrassar/JenkinsDocker.git
synced 2024-11-22 10:53:46 +00:00
update dockerfile
This commit is contained in:
parent
077d70a269
commit
a83409c347
10
Dockerfile
10
Dockerfile
@ -6,7 +6,7 @@ USER root
|
||||
|
||||
ENV TZ=Etc/GMT
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
RUN apt update && apt -y install wget gnupg2 openjdk-17-jdk zip unzip curl sudo git software-properties-common pass axel
|
||||
RUN apt update && apt -y install wget gnupg2 zip unzip curl sudo git software-properties-common pass axel
|
||||
|
||||
RUN mkdir -p /var/jenkins_home/jenkins && cd /var/jenkins_home/ &&\
|
||||
useradd -s /bin/bash -G sudo -d /var/jenkins_home -u 1000 jenkins &&\
|
||||
@ -16,7 +16,13 @@ ENTRYPOINT /var/jenkins_home/run
|
||||
COPY ./run /var/jenkins_home/
|
||||
RUN chown -R jenkins:jenkins /var/jenkins_home
|
||||
|
||||
USER 1000
|
||||
USER jenkins
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN curl -s "https://get.sdkman.io" | bash
|
||||
RUN source "$HOME/.sdkman/bin/sdkman-init.sh" &&\
|
||||
sdk install java `sdk ls java | grep librca | grep " 17" | grep -m 1 -Eo "(.?[0-9]{1,2}){3}" | head -1`-librca
|
||||
|
||||
VOLUME /var/jenkins_home/jenkins
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user