Google chrome HTTPS alternative name missing

I am using openssl to give my docker development environment HTTPS

certs are generated using this

 sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt

followed instruction from here – How can I install SSL on localhost in Ubuntu?

After adding the authorities in my browser i could use it correctly.

But in google chrome i get a message –

Broken HTTPS subject alternative name missing.

How can i fix that? I need to test my project on different browsers with HTTPS as it uses some secured cookie.

Source: Docker Questions