Skip to content

Instantly share code, notes, and snippets.

@theparadoxer02
Created June 5, 2018 17:54
Show Gist options
  • Save theparadoxer02/bbc7613a29609c6c11a6ca45e3fe28a8 to your computer and use it in GitHub Desktop.
Save theparadoxer02/bbc7613a29609c6c11a6ca45e3fe28a8 to your computer and use it in GitHub Desktop.
Dockerfile for a basic Django Project
# Base Image
FROM python:3.5-alpine
# Initialize
RUN mkdir -p /data/web
COPY . /data/web/
RUN mkdir -p mydjango/static/admin
# Setup
RUN apk update
RUN apk upgrade
RUN apk add --update python3 python3-dev
RUN apk add libffi-dev zlib-dev
ENV LIBRARY_PATH=/lib:/usr/lib
# Setup
WORKDIR /data/web
RUN pip3 install -r requirements.txt
RUN pip3 install gunicorn
# Copy entrypoint script into the image
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment