hexparrot/mineos-node

Docker + HTTPS does not work

Opened this issue · 4 comments

Hey folks, it appears that the SSL generation does not work. If there is a way to resolve this, I'd be happy to update the documentation!

$ git clone https://github.com/hexparrot/mineos-node.git
$ cd mineos-node
$ docker-compose up -d
$ curl -X GET https://localhost:8443
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

I'll investigate this and update the ticket with any solution I discover.


The more I'm reading, it seems like this is expected behavior. Maybe we can add some notes to the documentation about what the expected behavior is?

This is indeed expected behaviour. If you want to get rid of the message, add the used certificaty or the certificate authority that signed the certificate to your trusted CAs.

I get this, but are there docker variables I can pass on the command-line to assign certificates? If so, I have not seen them documented anywhere.

You should install certificate generated by mineos as trusted to every system you want to access it from. (Google for "installing self-signed certificate as trusted" for your OS). If you just want to use curl to test your setup, use curl -k https://localhost:8443 (-k is for "ignore errors").

Personally I use https://github.com/nginx-proxy/nginx-proxy. https://caddyserver.com/ should do similar things, but haven’t tried it out yet.