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