Skip to content

Instantly share code, notes, and snippets.

@nabeelio
Created July 16, 2016 01:41
Show Gist options
  • Save nabeelio/34e938e7644309fbc62bbb2dc6fc101b to your computer and use it in GitHub Desktop.
Save nabeelio/34e938e7644309fbc62bbb2dc6fc101b to your computer and use it in GitHub Desktop.
PyEnv Dockerfile
#
# Build a docker image and run the footbot application within
# with the python env being setup
#
# using debian jessie
FROM buildpack-deps:jessie
MAINTAINER Nabeel S <hi@nabs.io>
ENV APP_HOME /opt/footbot
ENV PYTHON_HOME /root/.pyenv/versions/3.5.1/bin/
ENV DEBIAN_FRONTEND noninteractive
# install and configure pyenv
RUN curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
RUN ~/.pyenv/bin/pyenv install -s 3.5.1
# configure the app
RUN mkdir -p $APP_HOME
COPY . $APP_HOME
WORKDIR $APP_HOME
RUN $PYTHON_HOME/pip install --upgrade pip wheel
RUN $PYTHON_HOME/pip install -r requirements.txt
# start redis and the app
CMD $PYTHON_HOME/python run.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment