Recommended to inject self-signed certificates in Jenkins official docker image

37 views
Skip to first unread message

sleipnir

unread,
Oct 9, 2016, 11:43:50 AM10/9/16
to Jenkins Users
Hi there

I am using the official jenkins image available here https://hub.docker.com/_/jenkins/ and everything is fine so far.
But in order to run my builds I need to install some self-signed certificates to access some internal servers, and I would rather keep using the default image and not create a custom one.

What would be the proper clean way to tell the jenkins image to install my certificates ?

Thanks




Victor Martinez

unread,
Oct 9, 2016, 12:42:02 PM10/9/16
to Jenkins Users
If I understood correctly you don't need to custom anything but using the FROM instruction in your Dockerfile to specify what Jenkins official image  you would like to use and on the top of it you can set your certificates accordingly:

FROM jenkins:2.19.1
COPY whatever_credentials
/whatever_location
 
That's the advantage of using docker, reusing someone else's images and specify your configuration by using the other docker instructions. It's worth using some SCM tool to track any changes in your Dockerfile.

Cheers

sleipnir

unread,
Oct 9, 2016, 2:35:28 PM10/9/16
to Jenkins Users
Thanks for the answer.
I was precisely trying to avoid maintaining a custom image just for the certificates, but if I don't have a choice, I'll go with it.
Reply all
Reply to author
Forward
0 new messages