diff --git a/Dockerfile b/Dockerfile index 4f4c16c6d2..87f2352e36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -FROM python:3.7.4-alpine as base -LABEL maintainer="Niranjan Rajendran " +FROM python:3.7-alpine as base #### @@ -9,25 +8,19 @@ WORKDIR /install RUN apk update && \ apk add --virtual build-deps git gcc python3-dev musl-dev jpeg-dev zlib-dev libevent-dev file-dev libffi-dev openssl && \ - apk add postgresql-dev && \ - pip install setuptools + apk add postgresql-dev ADD requirements.txt /requirements.txt ADD requirements /requirements/ -RUN wget https://bootstrap.pypa.io/ez_setup.py && python ez_setup.py - -ENV PYTHONPATH /install/lib/python3.7/site-packages -RUN pip install --install-option="--prefix=/install" setuptools && \ - LIBRARY_PATH=/lib:/usr/lib pip install --install-option="--prefix=/install" -r /requirements.txt +RUN pip install --prefix=/install --no-warn-script-location -r /requirements.txt #### FROM base COPY --from=builder /install /usr/local -RUN apk --no-cache add postgresql-dev ca-certificates libxslt jpeg zlib file libxml2 git && \ - pip install git+https://github.com/fossasia/flask-rest-jsonapi.git@0.12.6.1#egg=flask-rest-jsonapi +RUN apk --no-cache add postgresql-libs ca-certificates libxslt jpeg zlib file libxml2 WORKDIR /data/app ADD . . diff --git a/requirements/common.txt b/requirements/common.txt index a9d31258ab..d0388b2f3d 100644 --- a/requirements/common.txt +++ b/requirements/common.txt @@ -46,7 +46,7 @@ pytz diff-match-patch blinker~=1.4 envparse~=0.2 --e git+https://github.com/fossasia/flask-rest-jsonapi@0.12.6.1#egg=flask-rest-jsonapi +git+https://github.com/fossasia/flask-rest-jsonapi@0.12.6.1#egg=flask-rest-jsonapi wtforms~=2.2 flask-admin~=1.5 google-compute-engine~=2.8