Do not mount data from the host. It's called a bind-mount and is generally
strongly discouraged.

Not sure what is your purpose *exactly*.

To store data and be able to upgrade,I have written
https://batmat.net/2018/09/07/how-to-run-and-upgrade-jenkins-using-the-official-docker-image/
recently.

For the things like plugins, IIUC your use case: read the image
documentation and derive the official image by installing additional
plugins.

Cheers


Le ven. 21 sept. 2018 à 05:03, Narahari 'n' Savitha <[email protected]> a
écrit :

> Thank you folks in advance for your time and help.
>
> Need some input please.
> I used Dockerfile to pull lts-alpine
> I then  installed requisites for ansible and installed ansible.
> I ran container and mapped a volume so the jenkins home is shared with
> host.
> It all works.
> Now I can put jobs there from jenkins where we backup the config.xml.
>
> Now for some best practice questions help please
>
> I plan to setup Jenkins the way I want to (docker exec update plugins,
> jobs from git etc.,)
> Re start container but mount host to a /tmp/jenkins folder inside
> container.
> cp -Rf /tmp/jenkins /var/jenkins_home
> Stop container and docker commit the image.
>
> Start container with new image.  This way the image is completely self
> contained.
> What do you folks think ?  Is this a good idea ?
> I plan to update the cmd in the Dockerfile to use git to update jobs from
> git at startup or I can keep the latest job in the docker image.
> I am in confusion.  Kindly advise.
>
> -Narahari
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/7a8fe5a7-90b3-481e-84c9-fb6a3897966e%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/7a8fe5a7-90b3-481e-84c9-fb6a3897966e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS447e2HoUYdiMi-EgrN92jYuaQfOH6SynbWMUHfn0bTcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to