Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

added Dockerfile #65

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM debian:wheezy
MAINTAINER Casey Harford <[email protected]>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's a good practice to leave a MAINTAINER in Dockerfiles, but unless you publish it in a standalone repository you won, this will be maintained by the entire dev community, so please remove this line.


RUN apt-get update -y \
&& apt-get install wget curl -y -q \
&& curl -sL https://deb.nodesource.com/setup | bash - \
&& apt-get install nodejs build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev -y -q \
&& apt-get clean

RUN cd ~/ && wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 \
&& mv ~/phantomjs-1.9.7-linux-x86_64.tar.bz2 /usr/local/share/ \
&& cd /usr/local/share \
&& tar xvjf phantomjs-1.9.7-linux-x86_64.tar.bz2 \
&& ln -sf /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all those links necessary for screenshot-as-a-service to run? One should be enough I suppose.

&& ln -sf /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs \
&& ln -sf /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs

ADD . /app
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please find a better name than app, because the /app/app below doesn't make sense. Why nor screenshot-as-a-service?

RUN rm -rf /app/.git && cd /app && npm install
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete the .git?

WORKDIR /app
CMD ["node", "/app/app"]