django-alpine simple base image for django apps based on alpine python 3.6
379
Dockerfile linksdocker pull shawara/django-alpine:baseFROM python:3.6-alpine
ENV PYTHONUNBUFFERED 1
RUN apk add --no-cache --virtual .build-deps \
ca-certificates gcc postgresql-dev linux-headers musl-dev \
libffi-dev jpeg-dev zlib-dev \
&& pip install psycopg2==2.8.1 Pillow==6.0.0 \
&& find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
&& runDeps="$( \
scanelf --needed --nobanner --recursive /usr/local \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
)" \
&& apk add --virtual .rundeps $runDeps \
&& apk del .build-deps
docker pull shawara/django-alpine:gitDjango Alpine base image with git installed in case you want to install python package from github directly ex : pip install -e git+https://[URL]@[CommitID]#egg=[PackageName]
pip install psycopg2 if you are using Postgres database, must be installed before removing .build-deps
pip install Pillow is need for Djange ImageField , it is added here to save time of downloading 27 MB and installing it multiple times .
Content type
Image
Digest
Size
49.3 MB
Last updated
over 5 years ago
docker pull shawara/django-alpine