docker swarm
This commit is contained in:
@ -1,24 +1,29 @@
|
||||
FROM jenkins/jenkins:2.403-centos7
|
||||
|
||||
FROM --platform=linux/amd64 jenkins/jenkins:lts-jdk11
|
||||
USER root
|
||||
ENV MAVEN_VERSION 3.5.3
|
||||
ADD apache-maven-3.5.3 /opt/apache-maven-3.5.3
|
||||
|
||||
ADD gradle-7.3.2 /opt/gradle-7.3.2
|
||||
ADD gradle-8.7 /opt/gradle-8.7
|
||||
|
||||
ADD node-v12.22.8-linux-x64 /usr/local/node-v12.22.8-linux-x64
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
|
||||
|
||||
RUN node -v && npm -v
|
||||
|
||||
RUN ln -s /usr/local/node-v12.22.8-linux-x64/bin/node /usr/local/bin/node \
|
||||
&& ln -s /usr/local/node-v12.22.8-linux-x64/bin/npm /usr/local/bin/npm \
|
||||
&& npm install -g yarn \
|
||||
&& yarn config set registry https://mirrors.huaweicloud.com/repository/npm/ \
|
||||
&& yarn config set disturl https://mirrors.huaweicloud.com/nodejs/ \
|
||||
&& yarn config set electron_mirror https://mirrors.huaweicloud.com/electron/ \
|
||||
&& yarn config set registry https://registry.npm.taobao.org \
|
||||
&& yarn config set disturl https://npm.taobao.org/dist \
|
||||
&& yarn config set electron_mirror https://npm.taobao.org/mirrors/electron/ \
|
||||
&& yarn config set cache-folder /root/.yarn
|
||||
RUN apt-get install -y nodejs git vim curl sshpass
|
||||
|
||||
|
||||
# docker build -f Dockerfile -t marsal1212/jenkins:latest .
|
||||
# ADD node-v18.20.2-linux-x64 /usr/local/node-v18.20.2-linux-x64
|
||||
|
||||
# USER root
|
||||
# RUN ln -s /usr/local/node-v18.20.2-linux-x64/bin/node /usr/bin/node \
|
||||
# && ln -s /usr/local/node-v18.20.2-linux-x64/bin/npm /usr/bin/npm \
|
||||
# && npm install -g yarn \
|
||||
# && npm install -g pnpm
|
||||
|
||||
RUN node -v && npm -v && npm install -g yarn && npm install -g pnpm
|
||||
|
||||
|
||||
USER jenkins
|
||||
|
||||
# COPY --chown=jenkins:jenkins plugins.txt /usr/share/jenkins/ref/plugins.txt
|
||||
# RUN jenkins-plugin-cli -f /usr/share/jenkins/ref/plugins.txt
|
||||
|
||||
# docker build -f Dockerfile -t harbor.sino-assist.com/marsal1212/jenkins:latest .
|
Reference in New Issue
Block a user