UPD: jenkins wont work on root context. updated

This commit is contained in:
xpk 2020-04-28 16:02:43 +08:00
parent d3a3a4390a
commit ee3e077007
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86

View File

@ -1,12 +1,17 @@
FROM alpine:latest FROM alpine:latest
LABEL description="Jenkins" LABEL description="Jenkins"
LABEL maintainer="racken@one27.cf" LABEL maintainer="racken@one27.cf"
LABEL notes="Get initial admin password by docker exec -it <container-id> and cat /root/.jenkins/secrets/initialAdminPassword"
LABEL java-version="openjdk11"
LABEL jenkins-version="2.222.3"
LABEL exposed-port="8080"
LABEL jenkins-path="/jenkins"
ENV container docker ENV container docker
RUN apk add openjdk11 wget openjdk11-jre-headless ttf-dejavu; mkdir /opt/tomcat RUN apk add openjdk11 wget openjdk11-jre-headless ttf-dejavu; mkdir /opt/tomcat
WORKDIR /opt/tomcat WORKDIR /opt/tomcat
RUN wget -q -O- http://ftp.cuhk.edu.hk/pub/packages/apache.org/tomcat/tomcat-9/v9.0.34/bin/apache-tomcat-9.0.34.tar.gz | tar zxf - --strip-components=1 RUN wget -q -O- http://ftp.cuhk.edu.hk/pub/packages/apache.org/tomcat/tomcat-9/v9.0.34/bin/apache-tomcat-9.0.34.tar.gz | tar zxf - --strip-components=1
RUN rm -rf /opt/tomcat/webapps/ROOT RUN rm -rf /opt/tomcat/webapps/ROOT
RUN wget -q -O /opt/tomcat/webapps/ROOT.war http://mirrors.jenkins.io/war-stable/latest/jenkins.war RUN wget -q -O /opt/tomcat/webapps/jenkins.war http://mirrors.jenkins.io/war-stable/latest/jenkins.war
ENV JAVA_HOME="/usr" ENV JAVA_HOME="/usr"
ENV JAVA_OPTS="-Djava.awt.headless=true" ENV JAVA_OPTS="-Djava.awt.headless=true"
EXPOSE 8080 EXPOSE 8080