-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change to debian because apline not building
- Loading branch information
Showing
2 changed files
with
19 additions
and
28 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,30 +1,21 @@ | ||
FROM python:3.8-alpine | ||
FROM python:3.9-slim-buster | ||
WORKDIR /app | ||
|
||
# install depedencies | ||
COPY requirements.pip /app/requirements.pip | ||
RUN apk --no-cache add \ | ||
libgomp \ | ||
libjpeg-turbo \ | ||
postgresql-libs \ | ||
openblas \ | ||
zlib \ | ||
freetype-dev \ | ||
libxslt-dev \ | ||
&& apk --no-cache add --virtual .build-deps \ | ||
g++ \ | ||
gcc \ | ||
git \ | ||
libjpeg-turbo-dev \ | ||
postgresql-dev \ | ||
musl-dev \ | ||
openblas-dev \ | ||
zlib-dev \ | ||
libffi-dev \ | ||
file \ | ||
make \ | ||
&& pip --no-cache-dir --trusted-host=buildsba.lco.gtn install -r requirements.pip \ | ||
&& apk --no-cache del .build-deps | ||
COPY requirements.txt /app/requirements.txt | ||
|
||
RUN buildDeps='gcc g++' && \ | ||
apt-get update && \ | ||
apt-get install $buildDeps --no-install-recommends -y \ | ||
gettext python3-cffi libcairo2 libpango-1.0-0 \ | ||
libjpeg62-turbo-dev zlib1g-dev \ | ||
postgresql-11 libpq-dev \ | ||
libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info -y \ | ||
&& python3 -m pip install -r requirements.txt \ | ||
&& apt-get purge $buildDeps -y \ | ||
&& apt-get purge $(aptitude search '~i!~M!~prequired!~pimportant!~R~prequired!~R~R~prequired!~R~pimportant!~R~R~pimportant!busybox!grub!initramfs-tools' | awk '{print $2}') -y \ | ||
&& apt-get purge aptitude -y \ | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# install web application | ||
COPY . /app |
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