4

I'm trying to setup a python script that uses the requests library to get data from a website. The script works without issues running in a virtual environment on my windows 10 pc or on a azure vm.

However, when I try to create a docker container using the python:3.6-slim image I get DH_KEY_TOO_SMALL errors. Testing the website on ssllabs.com revealed that it supports weak DH key exchange parameters. What could be causing this error and how can I fix it?

eacooqy
  • 93
  • 2
  • 8

1 Answers1

4

I've managed to fix the issue. The problem was caused by openssl versions. Both my windows 10 pc and ubuntu 18.04 vm run an older version that had no problem connecting to the website. The python docker images contain a newer version of openssl that refused to connect.

eacooqy
  • 93
  • 2
  • 8
  • 1
    Temporary fix until the certificate gets updated: https://github.com/docker-library/php/issues/844#issuecomment-560022808 – Roger Feb 26 '20 at 12:28