If you're working in a docker environment and want to output the plugin list in a plugins.txt format in order to pass that to the install_scripts.sh use these scripts in the http://{jenkins}/script
console:
Jenkins.instance.pluginManager.plugins.each{
plugin ->
println ("${plugin.getShortName()}:${plugin.getVersion()}")
}
Jenkins.instance.pluginManager.plugins.each{
plugin ->
println ("${plugin.getShortName()}:latest")
}