I’ve updated my old repository on generating SSL certificates containing an IP SAN, which essentially allows to call https on IP addresses. It is still based on Docker, and now you can generate the certificates in a single command
docker run --rm -it -v$PWD:/certs firefoxmetzger/create_localhost_ssl
After filling in the required information, the container will generate the certificate, place it into your current folder and then self-destruct.
If you want the certificate stored in a different location, or if the $PWD environment variable isn’t defined (Windows, some unix variants). Replace $PWD with the location of your choice:
docker run --rm -it -v<absolute_path>:/certs firefoxmetzger/create_localhost_ssl
If you need to customize the certificate you can supply your own config file
docker run --rm -it -v$PWD:/certs -v<absolute/path/to/config.cfg>:/config.cfg firefoxmetzger/create_localhost_ssl
You can find the default config (and all other files) on GitHub, and – for your convenience – I pasted the config below, too.