Sign inSign up

phoikoi/alpine-django-base

By phoikoi

•Updated almost 9 years ago

Django base image with channels, asgi_redis, psycopg2, redis, requests, etc. See dockerfile.

Image
0

512

phoikoi/alpine-django-base repository overview

This is intended as a base image which you can use to drop your django app into. It might be good to create separate images for /usr/bin/daphne to run the channels interface server, and for the workers.

There are armhf, arm64, and amd64 variant tags available.

Dockerfile for armhf variant (amd64 and arm64 are exactly the same except based from alpine:edge and multiarch/alpine:arm64-edge respectively):

FROM multiarch/alpine:armhf-edge

RUN apk update \
  && apk --no-cache add python3 \
     py3-psycopg2 \
     wget \
  && wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py \
  && python3 get-pip.py \
  && cd /usr/bin/ \
  && ln -s pydoc3 pydoc \
  && ln -s python3 python \
  && rm /get-pip.py \
  && apk del wget \
  && ln -s pip3 pip \
  && apk add py3-pillow redis py3-lxml \
  && pip install --no-cache-dir certifi \
&& apk add --no-cache --virtual=build-dependencies \
    autoconf \
    automake \
    freetype-dev \
    g++ \
    gcc \
    jpeg-dev \
    lcms2-dev \
    libffi-dev \
    libpng-dev \
    libwebp-dev \
    linux-headers \
    make \
    openjpeg-dev \
    openssl-dev \
    python3-dev \
    tiff-dev \
    zlib-dev \
&& pip install --no-cache-dir -U \
    'twisted==17.1.0' \
&& apk del --purge \
    build-dependencies \
&& rm -rf \
    /root/.cache \
    /tmp/* \
&& pip install --no-cache-dir requests arrow beautifulsoup4 redis django channels asgi_redis html5lib pytz dj_database_url

Tag summary

Content type

Image

Digest

Size

44.3 MB

Last updated

almost 9 years ago

docker pull phoikoi/alpine-django-base:arm64-20171022