Create a gist now

Instantly share code, notes, and snippets.

@akagisho /Dockerfile
Last active Feb 19, 2017

FROM ubuntu:xenial
MAINTAINER akagisho <akagisho@gmail.com>
RUN sed -i -e "s|http://archive.ubuntu.com/|http://jp.archive.ubuntu.com/|" /etc/apt/sources.list
RUN apt update \
&& apt install -y curl git libfontconfig-dev fonts-takao* supervisor sudo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt install -y nodejs
RUN cd /usr/local/src \
&& curl -OL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 \
&& tar -xf phantomjs-2.1.1-linux-x86_64.tar.bz2 \
&& cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/
RUN useradd -m -d /home/node -s /bin/bash node \
&& sudo -u node -H git clone https://github.com/egohaguf/snapshot /home/node/snapshot \
&& cd /home/node/snapshot \
&& sudo -u node -H npm install
RUN cp /home/node/snapshot/etc.supervisor/conf.d/snapshot.conf /etc/supervisor/conf.d/
EXPOSE 3000
ENTRYPOINT /usr/bin/supervisord -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment