Skip to content

Instantly share code, notes, and snippets.

@taion809
Created August 23, 2013 15:23
Show Gist options
  • Save taion809/6320561 to your computer and use it in GitHub Desktop.
Save taion809/6320561 to your computer and use it in GitHub Desktop.
FROM ubuntu
MAINTAINER Nicholas Johns
RUN echo "deb http://archive.ubuntu.com/ubuntu precise universe" > /etc/apt/sources.list.d/universe.list
RUN apt-get update; apt-get install -y -q wget curl python-software-properties libonig2 libqdbm14
RUN add-apt-repository ppa:ondrej/php5
RUN wget -qO - http://nginx.org/keys/nginx_signing.key | apt-key add -
#Try to combine RUN directives where possible to avoid hitting the RUN limit.
RUN echo "deb http://nginx.org/packages/mainline/ubuntu/ precise nginx" > /etc/apt/sources.list.d/nginx.list; apt-get update
RUN apt-get install -y -q nginx php5-cli
RUN perl -pi -e "s#;date.timezone =#date.timezone = Asia/Tokyo#g" /etc/php5/cli/php.ini
#Install PieCrust
RUN cd /usr/local/bin; curl -sS http://backend.bolt80.com/piecrust/install | php
#Remove old nginx configuration, we have out own.
RUN rm -rf /etc/nginx
#Pull nginx configuration from repo.
RUN cd /etc; wget --no-check-certificate https://github.com/taion809/redstalker.com-nginx/archive/master.tar.gz -O - | tar xz
RUN mv /etc/redstalker.com-nginx-master /etc/nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
EXPOSE 80
#Pull and move the content into place.
RUN cd /srv; wget --no-check-certificate https://github.com/taion809/redstalker.com/archive/master.tar.gz -O - | tar -xz
RUN mv /srv/redstalker.com-master /srv/redstalker.com
RUN cd /srv/redstalker.com; /usr/local/bin/chef bake
CMD ["nginx"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment