Alpine 3.3, Python 2.7.11, urllib2 causing SSL: CERTIFICATE_VERIFY_FAILED : <p>I have this small Dockerfile</p>

<pre><code>FROM alpine:3.3
RUN apk --update add python
CMD ["python", "-c", "import urllib2; response = urllib2.urlopen('https://www.python.org')"]
</code></pre>

<p>Building it with <code>docker build -t alpine-py/01 .</code> and then running it with <code>docker run -it --rm alpine-py/01</code> creates the following output</p>

<pre><code>Traceback (most recent call last):
  File "&lt;string&gt;", line 1, in &lt;module&gt;
  File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1240, in https_open
    context=self._context)
  File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open
    raise URLError(err)
urllib2.URLError: &lt;urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)&gt;
</code></pre>

<p>Yesterday I got bitten by the recent OpenSSL 1.0.2g release, which caused <code>py-cryptograpy</code> to not compile. Luckily the guys from <code>py-cryptography</code> released a new version on PyPI a couple of hours later. The issue was that a function in OpenSSL got a new signature.</p>

<p>Could this be related or am I missing something?</p>
