Created
June 5, 2018 17:54
-
-
Save theparadoxer02/bbc7613a29609c6c11a6ca45e3fe28a8 to your computer and use it in GitHub Desktop.
Dockerfile for a basic Django Project
This file contains hidden or 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
# 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