How to setup SSL for localhost or dev environment?

I.e. I allways get Dokku container error and I thinkn the problem is with SSL.

I use Letsencrypt dokku plugin like in that tutorial.