Jenkins 本身自带了 Java,而不带 Maven,所以重新做一个自带 Maven 的 Jenkins 镜像 cat >jenkins-dockerfile/Dockerfile <<EOF FROM jenkinsci/jenkins ADD apache-maven-3.5.4-bin.tar.gz /usr/local/ ENV MAVEN_HOME=/usr/local/apache-maven-3.5.4 ENV PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH USER root RUN apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/* RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers USER jenkinsEOF 参照: https://huanqiang.wang/2018/03/30/Jenkins-Gitlab-Kubernetes-%E7%9A%84%E8%87%AA%E5%8A%A8%E5%8C%96%E6%8C%81%E7%BB%AD%E9%9B%86%E6%88%90%E4%B8%8E%E9%83%A8%E7%BD%B2/
原文地址:https://www.cnblogs.com/effortsing/p/10480712.html
时间: 2024-11-01 22:40:38