FROM ubuntu:precise

RUN rm /bin/sh && ln -s /bin/bash /bin/sh

RUN apt-get -y update && apt-get install -y \
  build-essential \
  curl \
  git \
  libfontconfig1 \
  libssl-dev \
  python-software-properties \
  unzip

RUN curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip" && \
  unzip awscli-bundle.zip && \
  ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get -y update && apt-get install -y \
  g++-5 \
  gcc-5
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 80 --slave /usr/bin/g++ g++ /usr/bin/g++-5
RUN update-alternatives --set gcc /usr/bin/gcc-5

RUN curl -sL https://deb.nodesource.com/setup_4.x | bash
RUN apt-get -y update && apt-get install -y \
  nodejs
