Install SSL Certificate for Docker Container on EC2

0

We are running an NGINX Server on a Docker Container which is hosted on an EC2 instance. Our Domain is registered with Amazon Route 53 but it seems like, there is missing an SSL Certificate on Docker or on EC2 instance.

The message is as following when we curl our Domain -

* Connected to <<our domain>> (<<our IP of EC2 Instance>>) port 443 (#0)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to <<our domain>>:443
* Closing connection 0
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to <<our domain>>:443

it works fine on http..

I tried to install with CertBot on our Docker Container - like this Tutorial . I can't even install snapd - Unable to find package.. on updating the Debian, I get there's no updates possible..

Any Recomadations? Thanks a lot!

Flo
已提问 2 个月前235 查看次数
1 回答
0

Hello.

There is an official container image for certbot, so if you use this to issue an SSL certificate and copy the certificate to the Nginx container, you can use it with HTTPS.
https://hub.docker.com/r/certbot/certbot

profile picture
专家
已回答 2 个月前
profile picture
专家
已审核 2 个月前
  • Or place your NGINX behind an ALB with an SSL Cert

  • I tried to place my EC2 behind an Alb with an SSL Cert - I just get an 502 Bad Gateway and don't know what happened or what cause this. I also tried to install Certbot but im not able to install this inside my Docker Container - or should this be an own Container with CertBot on it?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则