AWS: docker container cannot connect to external website on SSL

On my ec2 instance, there is a container hosting a website (e.g. WordPress).
This containers binds container ports 80 and 443 to ports 8080 ad 8081 of the host (both are enabled for inbound traffic in the security group).

The problem is that the website inside the container needs to connect to external websites on SSL, but it fails in doing so.

  • Docker Continuous Integration with AWS
  • Authorization error with AWS
  • Deploying Docker Data Volumes
  • How to make redis BROKER_URL dynamic on deployment to AWS instance
  • Can't mount HOST folder into Amazon Docker Container?
  • RabbitMQ Cluster in Docker Container among different hosts
  • It looks like a problem of the security group/firewall…but I coudn’t detect the specific cause yet, as the security group is now it should work.

    If I enter the container, ping of the external website (e.g. works.

    I don’t know if it is related, but recently the EC2 instance had problem validating ssl certificates, even the python pip tool wasn’t able to validate SSL certificate inside the container.

    Any help?
    Does wordpress use another port – no 443 port – to connect to


    • the specific error message is the following:

    SSL certificate problem: unable to get local issuer certificate

    • one the website is WordPress, and it logs the following message:

    Warning: An unexpected error occurred. Something may be wrong with or this server’s configuration. If you continue to have
    problems, please try the support forums. (WordPress could not
    establish a secure connection to Please contact your
    server administrator.) in /var/www/html/wp-includes/update.php on line

    • the website is not configured to serve https
    • inside both the container and the host the packet ca-certificates is installed

  • How to copy files from local machine to docker container on windows
  • How to register EC2 Instance to ECS cluster?
  • Difference between of intermediate_ip_address and private_ip_address in bluemix container groups
  • lxc-attach failed to enter the namespace - EC2 Instances
  • No access to AWS RDS from AWS ECS Docker Container
  • How can i access the website running inside a Docker container using IP address of container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.