1 Star 0 Fork 0

nicliuqi/docsci

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 2.00 KB
一键复制 编辑 原始数据 按行查看 历史
Se7en 提交于 2023-03-02 11:29 . initial
FROM openeuler/openeuler:22.09
COPY . /root/tool-collections
ENV GOROOT=/usr/local/go
ENV PATH=$PATH:$GOROOT/bin
ENV GOPATH=/go
ENV LANG=en_US.UTF-8
RUN cp /usr/bin/python3 /usr/bin/python
RUN yum update && \
yum install -y wget tar git vim subversion python3-pip java-11-openjdk-devel sudo ruby && \
pip3 install requests python-jenkins PyYAML pandas openpyxl xlsx2html codespell && \
wget -O go.tar.gz https://golang.org/dl/go1.12.1.linux-amd64.tar.gz && \
tar -C /usr/local -zxf go.tar.gz && \
rm -f go.tar.gz
RUN cd /root/tool-collections/ && GOFLAGS=-mod=vendor go build -o validator ./cmd/tools && cp validator /usr/bin
RUN gem install mdl
# Setup java path
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
ENV PATH $PATH:$JAVA_HOME/bin
# Install jenkins slave
ARG VERSION=4.2.1
ARG user=jenkins
ARG group=jenkins
ARG uid=1000
ARG gid=1000
RUN groupadd -g ${gid} ${group}
RUN useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user}
ARG AGENT_WORKDIR=/home/${user}/agent
RUN mkdir -p /usr/share/jenkins/
COPY agent.jar /usr/share/jenkins/
RUN cd /usr/share/jenkins/ \
&& wget -O agent.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar \
&& chmod 755 /usr/share/jenkins \
&& chmod 644 /usr/share/jenkins/agent.jar \
&& ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar
# Install jnlp
COPY jenkins-agent /usr/local/bin/jenkins-agent
RUN chmod +x /usr/local/bin/jenkins-agent &&\
ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave
# Add Tini
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
RUN mkdir /home/infra_check
# Add validator
RUN cp /usr/bin/validator /home/infra_check
# Setting up env
USER ${user}
ENV AGENT_WORKDIR=${AGENT_WORKDIR}
RUN mkdir /home/${user}/.jenkins && mkdir -p ${AGENT_WORKDIR}
VOLUME /home/${user}/.jenkins
VOLUME ${AGENT_WORKDIR}
WORKDIR /home/${user}
ENTRYPOINT ["/tini", "--", "jenkins-agent"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nicliuqi/docsci.git
git@gitee.com:nicliuqi/docsci.git
nicliuqi
docsci
docsci
master

搜索帮助