-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Remove cruft and simplify Dockerfile (#6633)
Also, change to new syntax of pip for install prefix Ref: #6543 pypa/pip#7240 (comment)
- Loading branch information
1 parent
f3bb95c
commit d8a71db
Showing
2 changed files
with
5 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
FROM python:3.7.4-alpine as base | ||
LABEL maintainer="Niranjan Rajendran <[email protected]>" | ||
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/[email protected]#egg=flask-rest-jsonapi | ||
RUN apk --no-cache add postgresql-libs ca-certificates libxslt jpeg zlib file libxml2 | ||
|
||
WORKDIR /data/app | ||
ADD . . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ pytz | |
diff-match-patch | ||
blinker~=1.4 | ||
envparse~=0.2 | ||
-e git+https://github.com/fossasia/[email protected]#egg=flask-rest-jsonapi | ||
git+https://github.com/fossasia/[email protected]#egg=flask-rest-jsonapi | ||
wtforms~=2.2 | ||
flask-admin~=1.5 | ||
google-compute-engine~=2.8 | ||
|