Skip to content

Instantly share code, notes, and snippets.

@LeeroyDing
Created November 18, 2016 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LeeroyDing/c3d1b6707bfc926e85ace08ee631d27b to your computer and use it in GitHub Desktop.
Save LeeroyDing/c3d1b6707bfc926e85ace08ee631d27b to your computer and use it in GitHub Desktop.
Sample Dockerfile for python web project
FROM python:2.7
MAINTAINER Leeroy Ding <i@leeroy.im>
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