title: Docker: Installing python cryptography on alpine linux distribution
body: <p>I am a little bit new to Docker and deployment cycle.</p>
  
  <p>I have Django application that we would like to deploy with uWSGI to docker container. Actually the deploy worked perfectly for a few weeks, but now it soundly report error... </p>
  
  <p>Error seam to be with cryptography package:</p>
  
  <pre><code>build/temp.linux-x86_64-3.6/_openssl.c:52862:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
  build/temp.linux-x86_64-3.6/_openssl.c: In function '_cffi_f_SSL_set_options':
  build/temp.linux-x86_64-3.6/_openssl.c:52895:14: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
     { result = SSL_set_options(x0, x1); }
                ^~~~~~~~~~~~~~~
  build/temp.linux-x86_64-3.6/_openssl.c:52895:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-dg_tg9pa/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-my98rwq4/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-dg_tg9pa/cryptography/ 
  The command '/bin/sh -c pip install --no-cache-dir -r requirements.txt' returned a non-zero code: 1
  ERROR: Job failed: exit code 1
  </code></pre>
  
  <p>Our docker file looks like </p>
  
  <pre><code>FROM python:3-alpine
  
  ENV PYTHONUNBUFFERED 1
  
  WORKDIR /usr/src/app
  
  RUN apk add --no-cache gcc mailcap python3-dev build-base linux-headers pcre-dev postgresql-dev libffi-dev libressl-dev
  
  COPY requirements.txt ./
  RUN pip install --no-cache-dir -r requirements.txt
  </code></pre>
  
  <p>As I mention the docker file and requirement.txt hasn't change between success build and failed one. (What is the most strange to me...)</p>
  
  <p>The only think I could think is that command </p>
  
  <pre><code>FROM python:3-alpine
  </code></pre>
  
  <p>is taking the different version of alpine...</p>
  
  <p>Is this possible? What could be wrong? How to fix it? </p>