Skip to content

Instantly share code, notes, and snippets.

@kennethreitz
Last active August 29, 2015 14:20
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 kennethreitz/5fc21366fa63b8512cb6 to your computer and use it in GitHub Desktop.
Save kennethreitz/5fc21366fa63b8512cb6 to your computer and use it in GitHub Desktop.
Python buildpack attempt within Dockerifle
FROM heroku/cedar:14
RUN useradd -d /app -m app
USER app
WORKDIR /app/src
ENV HOME /app
ENV PORT 3000
ENV PATH /app/.heroku/python/bin:/tmp/python-pack/bin:$PATH
ENV STACK cedar-14
ENV PYTHONHOME /app/.heroku/python
ENV PYTHONPATH /app/
RUN mkdir -p /app/.heroku
RUN mkdir -p /tmp/app
RUN mkdir -p /app/src
RUN mkdir -p /app/.profile.d
RUN mkdir -p /tmp/python-pack
RUN mkdir -p /tmp/cache
RUN mkdir -p /tmp/environment
WORKDIR /app/src
WORKDIR /tmp/python-buildpack/bin
WORKDIR /app/
ONBUILD COPY . /app/
ONBUILD RUN git clone https://github.com/heroku/heroku-buildpack-python.git /tmp/python-pack -b docker
ONBUILD RUN bash -l /tmp/python-pack/bin/compile /app /tmp/cache /app/.env
ONBUILD COPY . /app/src/
ONBUILD EXPOSE 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment