I have been fruitlessly searching the internet for 2 days now looking for a way to install postgresql-dev for 9.6 due to an extremely outdated dep I'm trying to run. Unfortunately, running the following Dockerfile commands:
FROM python:2.7-alpine
ENV PYTHONUNBUFFERED 1
RUN mkdir /app/
RUN mkdir ./app/logs/
RUN mkdir ./app/xxx/
WORKDIR /app/xxx/
ADD requirements.txt /app/xxx/
ADD ./ /app/xxx/
RUN apk --update add python py-pip openssl postgresql-dev ca-certificates py-openssl libffi-dev musl-dev openssl-dev wget build-base gcc python-dev py-pip jpeg-dev zlib-dev libx
ml2 libxslt-dev
ENV LIBRARY_PATH=/lib:/usr/lib
RUN pip install --upgrade pip setuptools
RUN pip install psycopg2==2.4.5
Gives me the following error:
Collecting psycopg2==2.4.5
Downloading https://files.pythonhosted.org/packages/36/77/894a5dd9f3f55cfc85682d3e6473ee5103d8d418b95baf4019fad3ffa026/psycopg2-2.4.5.tar.gz (719kB)
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
Error: could not determine PostgreSQL version from '11.2'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-UcoQQZ/psycopg2/
Which I understand means that I'm installing PostgreSQL 11.2 from postgresql-dev when I need 9.6. I cannot seem to find this apk anywhere, and running postgresql-dev=9.6.5 or its equivalents does not appear to work either.
Is there any way to get this version of postgresql-dev from python2.7 alpine (or any other docker)? I saw that there are postgres docker containers but I'm new to docker and couldn't get them running either (psycopg2 was completely unable to find their installations)