我正在构建一个构建 Jenkins 的图像,并且我尝试在 Jenkins 运行时使用插件,因此,我需要在执行插件之前运行 Jenkins。
我像 docker build -t dockerfile 和我得到的错误一样执行它:
jenkins.JenkinsException:请求错误:[Errno 99] 无法分配请求的地址
我认为问题是当插件被执行时它猜测詹金斯正在运行而不是。
FROM foxylion/jenkins
MAINTAINER Mishel Uchuari <dmuchuari@hotmail.com>
RUN /usr/local/bin/install-plugins.sh workflow-remote-loader workflow-aggregator build-pipeline-plugin
ENV JENKINS_USER replicate
ENV JENKINS_PASS replicate
USER root
RUN apt-get -y update && apt-get -y upgrade
RUN apt-get install -y apt-utils
RUN apt-get install -y python-pip
RUN apt install -y linuxbrew-wrapper
RUN useradd someuser -m -s /bin/bash
USER someuser
RUN chmod -R 777 /home/someuser
RUN brew install libyaml
USER root
RUN apt-get install build-essential
RUN apt-get -y update && apt-get -y upgrade
RUN pip install jenkins-job-builder==2.0.0.0b2
RUN pip install PyYAML python-jenkins
RUN mkdir /etc/jenkins_jobs/
COPY jenkins_jobs.ini /etc/jenkins_jobs/
COPY scm_pipeline.yaml /etc/jenkins_jobs/
RUN jenkins-jobs --conf /etc/jenkins_jobs/jenkins_jobs.ini update /etc/jenkins_jobs/scm_pipeline.yaml