Automatically create initial admin user

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatically create initial admin user

Jochen Wiedmann

Hi,

I am trying to set up a docker image, which should be ready to use. In particular, I wouldn't want the image user to read the contents of the initial_admin_password file from the Docker log or from the running container. Instead, I would want something like "Read the initial admin details from a file, which I specify be setting an environment variable." Or, whatever works.

How would you do that?

Thanks,

Jochen

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bb7ef044-d9f0-484d-9c44-1433d2a9decfn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Automatically create initial admin user

Jan Monterrubio
We have some code that enables security and sets the admin user with credentials admin/hunter2 based on it an ENABLE_SECURITY environment variable is set. 

Look for Jenkins init groovy samples to configure the admin password , you should be able to accomplish what you want with a little bit of tweaking.  


On Thu, Mar 11, 2021 at 09:21 Jochen Wiedmann <[hidden email]> wrote:

Hi,

I am trying to set up a docker image, which should be ready to use. In particular, I wouldn't want the image user to read the contents of the initial_admin_password file from the Docker log or from the running container. Instead, I would want something like "Read the initial admin details from a file, which I specify be setting an environment variable." Or, whatever works.

How would you do that?

Thanks,

Jochen

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bb7ef044-d9f0-484d-9c44-1433d2a9decfn%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9%2BogJ%3Dn9iiYfbxxCNcUwSCuOsOhh2t5GfrY-r-G6aLNjA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Automatically create initial admin user

Ivan Fernandez Calvo
In reply to this post by Jochen Wiedmann
you can use Jenkins Configuration as Code plugin (https://github.com/jenkinsci/configuration-as-code-plugin) to configure your security see the Matrix Authentication example  at https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos/matrix-auth

El jueves, 11 de marzo de 2021 a las 16:21:19 UTC+1, [hidden email] escribió:

Hi,

I am trying to set up a docker image, which should be ready to use. In particular, I wouldn't want the image user to read the contents of the initial_admin_password file from the Docker log or from the running container. Instead, I would want something like "Read the initial admin details from a file, which I specify be setting an environment variable." Or, whatever works.

How would you do that?

Thanks,

Jochen

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9f2807a9-83c0-4d4e-8da9-bf392a28da14n%40googlegroups.com.