我是新来码头的。我想和纽曼,詹金斯,詹金斯一起做一个码头集装箱。请帮帮我。
我建立了一个码头形象,基于詹金斯的官方形象https://hub.docker.com/r/jenkins/jenkins。
我用的是DockerFile。构建成功,Jenkins应用程序也成功运行。
在运行Jenkins之后,我以root docker exec -u 0 -it jenkins bash的身份打开了容器,并尝试使用jenkins-作业生成器添加新作业。
jenkins-jobs --conf ./jenkins_jobs.ini update ./jobs.yaml
但我有bash: jenkins-jobs: command not found
这是我的Dockerfile
FROM jenkins/jenkins
USER root
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
RUN apt-get -y install nodejs
RUN npm install -g newman
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python get-pip.py
RUN pip install --user jenkins-job-builder
USER jenkins发布于 2019-08-22 07:40:22
在建立你的形象时,你会收到一些警告。特别是这个很有趣:
WARNING: The script jenkins-jobs is installed in '/root/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.只需从--user中移除RUN pip install --user jenkins-job-builder标志,就可以了。
https://stackoverflow.com/questions/57593044
复制相似问题