承诺詹金斯码头图像不会保存更改

发布于 2025-02-07 00:46:32 字数 226 浏览 1 评论 0原文

我从此处从

最后,我保存了詹金斯的更改。

我想创建一个新图像。我停止容器,并将其提交给新图像。

然后,我从新图像开始一个新容器...而詹金斯不包含我的任何更改。

我使用Docker版本1.6.2,构建7C8FCA2

I pull the official Jenkins docker image from here.
From Jenkins UI I create a new job , install the github plugin and set the repo urls in the job configuration.

Finally I save the changes from Jenkins.

I want to create a new image as it is. I stop the container, and commit it to a new image.

Then I start a new container from the new image...and Jenkins does not contain any of my changes.

I use Docker version 1.6.2, build 7c8fca2

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

感性 2025-02-14 00:46:32

dockerfile 将jenkins主目录声明为a 卷”>卷

# Jenkins home directoy is a volume, so configuration and build history 
# can be persisted and survive image upgrades
VOLUME /var/jenkins_home

这意味着对Jenkins配置的所有更改都是在Docker Image之外进行的。

更新

项目README描述了如何使用预装的插件创建自己的衍生docker映像。

https://github.com/jenkinsci/docker/docker/blob/blob/master/master/master/readme.md.md 例子

FROM jenkins
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt

The Dockerfile declares the jenkins home directory as a volume

# Jenkins home directoy is a volume, so configuration and build history 
# can be persisted and survive image upgrades
VOLUME /var/jenkins_home

This means all changes to the Jenkins configuration is made outside of the docker image.

Update

The project README describes how to create your own derivative docker images with plugins pre-installed.

For example

FROM jenkins
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文