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