FROM jenkins/jnlp-slave:latest

MAINTAINER <sre,sre@me.org>

LABEL Description="base from jnlp-slave:latest,add maven-3.6.1"

# 切换到 root 账户进行操作
USER root

# 安装 maven-3.6.1
RUN wget http://mirrors.sonic.net/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz && \
    tar zxvf apache-maven-3.6.1-bin.tar.gz && \
    mv apache-maven-3.6.1 /usr/local && \
    rm -f apache-maven-3.6.1-bin.tar.gz && \
    ln -s /usr/local/apache-maven-3.6.1/bin/mvn /usr/bin/mvn && \
    ln -s /usr/local/apache-maven-3.6.1 /usr/local/apache-maven

USER jenkins
docker build -t registry.cn-hangzhou.aliyuncs.com/sre_pub/jnlp-slave:3.6.1 .
docker push registry.cn-hangzhou.aliyuncs.com/sre_pub/jnlp-slave:3.6.1

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code