Created
November 18, 2016 11:59
-
-
Save LeeroyDing/c3d1b6707bfc926e85ace08ee631d27b to your computer and use it in GitHub Desktop.
Sample Dockerfile for python web 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
FROM python:2.7 | |
MAINTAINER Leeroy Ding <[email protected]> | |
EXPOSE 8080 | |
# Nodejs is required for npm, which will be used to install less | |
RUN apt-get update && apt-get install -y curl | |
RUN curl -sL https://deb.nodesource.com/setup | bash - | |
RUN apt-get update && apt-get install -y \ | |
nodejs libpq-dev libjpeg-dev ca-certificates python-openssl | |
WORKDIR /app | |
RUN virtualenv /env | |
RUN /env/bin/pip install --upgrade pip | |
ADD requirements.txt /app/requirements.txt | |
RUN /env/bin/pip install -r requirements.txt | |
ADD . /app | |
ENTRYPOINT ["/env/bin/uwsgi", "/app/uwsgi.ini"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment