Skip to content

Instantly share code, notes, and snippets.

@astraw
Created November 18, 2013 21:49
Show Gist options
  • Save astraw/7535971 to your computer and use it in GitHub Desktop.
Save astraw/7535971 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Build this docker image with:
#
# sudo docker build .
#
# Take note of the <image_id>, which will be the output above in the
# form "Successfully built <image_id>". Now, run the IPython web
# notebook with:
#
# sudo docker run -p 8889:8889 <image_id>
#
# This will spawn a webserver on port 8889. Go there and follow the
# instructions.
FROM ubuntu:12.04
MAINTAINER Andrew Straw <strawman@astraw.com>
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
# ---- install IPython ------------
RUN apt-get install -y curl python-dev build-essential
RUN curl -o distribute_setup.py http://python-distribute.org/distribute_setup.py
RUN python distribute_setup.py
RUN curl -o get-pip.py https://raw.github.com/pypa/pip/master/contrib/get-pip.py
RUN python get-pip.py
RUN apt-get install -y libzmq-dev
RUN pip install pyzmq
RUN pip install ipython
RUN pip install jinja2
RUN pip install tornado
# ---- install stdeb ------------
# Install stdeb
RUN apt-get install -y git debhelper python
RUN git clone https://github.com/astraw/stdeb.git
RUN cd stdeb && python setup.py install
# Get requirements for building debian source package
RUN apt-get install -y python-setuptools
# ---- misc helpers ------------
RUN pip install python-debian==0.1.21
RUN pip install chardet==2.1.1 # required for python-debian
# --- config for starting IPython -----
EXPOSE 8889
ADD build_and_publish_pypi.ipynb /notebooks/build_and_publish_pypi.ipynb
# --- command for starting IPython -----
CMD ipython notebook --NotebookApp.ip='*' --NotebookApp.port=8889 --notebook-dir=/notebooks

This uses docker to create an IPython notebook pre-configured to build a Debian source package. See the comments at the top of the Dockerfile for further instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment