Jenkins: how would i bash script the initialAdminPassword set up for a dockerfile as opposed to pasting into the browser

Is it possible to bash script the setup process of jenkins, for example i have jenkins container set-up on my local machine, i would like to complete jenkins set-up entirely on bash for the purpose of scripting this entirely from a dockerfile.

I need to be able to pass initialAdminPassword without the use of a browser and just from the terminal.

Is it possible to complete the set-up from the terminal?

Source: StackOverflow