Skip to content

Instantly share code, notes, and snippets.

@olalonde
Created March 20, 2014 21:07
Show Gist options
  • Save olalonde/9673831 to your computer and use it in GitHub Desktop.
Save olalonde/9673831 to your computer and use it in GitHub Desktop.
FROM ubuntu:precise
MAINTAINER Olivier Lalonde <olalonde@gmail.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
RUN apt-get install -y bitcoind git node
# install node
RUN apt-get install -y wget
RUN wget http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-x64.tar.gz
RUN tar xzf node-v0.10.26-linux-x64.tar.gz
# there is a radio package also called node, remove it
RUN rm /usr/sbin/node
RUN ln -s /node-v0.10.26-linux-x64/bin/node /usr/sbin/node
RUN ln -s /node-v0.10.26-linux-x64/bin/npm /usr/sbin/npm
# setup bitcoind
RUN cd opt && git clone https://github.com/bitpay/insight-api.git
RUN mkdir -p /data/bitcoin
RUN cp /opt/insight-api/etc/bitcoind/bitcoin-livenet.conf /data/bitcoin/bitcoin.conf
# install insight-api
RUN apt-get install -y build-essential
RUN cd /opt/insight-api/ && npm install
ADD start.sh start.sh
EXPOSE 3000
ENTRYPOINT [ "/bin/bash", "/start.sh" ]
@jprjr
Copy link

jprjr commented Mar 20, 2014

A simplified version

ROM stackbrew/ubuntu:12.04

ENV DEBIAN_FRONTEND noninteractive

RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y python-software-properties python g++ make curl git

RUN add-apt-repository -y ppa:chris-lea/node.js && apt-get update
RUN apt-get install -y nodejs


RUN cd /opt && git clone https://github.com/bitpay/insight-api.git
RUN cd /opt/insight-api && npm install

RUN mkdir -p /data/bitcoin
RUN cp /opt/insight-api/etc/bitcoind/bitcoin-livenet.conf /data/bitcoin/bitcoin.conf

EXPOSE 3000

ADD start.sh /start.sh

ENTRYPOINT ["/start.sh"]

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