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
asked 2 months ago208 views
1 Answer
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
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago
  • 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?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions