Extracting superadmin.p12 keystore from Primekey EJBCA CE Docker image w/ external database

  ca, docker, jks, pki, truststore

I am trying to set up a container using said official image of EJBCA to use as a Root CA (or Management CA) and what I can’t put my finger on is how to get the superadmin keystore, which I need to set up sub-CAs. The image description on dockerhub reads that I shall see the instructions printed to the console output but it only happens if I don’t use an external database and go with the bundled-in h2 database. And I cannot use the info printed then, since it prints the URL to EJBCA GUI and a password for the superadmin that is different each time.

I’ll appreciate any help.

Source: StackOverflow