forked from fzaninotto/screenshot-as-a-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 826 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM node
# Set ENV
ENV PHANTOMJS_VERSION 2.1.1
# Commands
RUN apt update && apt -y upgrade
RUN apt install -y \
libfreetype6 \
libfontconfig
RUN curl -OL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 && \
bunzip2 phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 && \
tar -xf phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar && \
rm -f phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar && \
mv phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin/phantomjs /usr/bin/ && \
rm -rf /var/www/phantomjs-$PHANTOMJS_VERSION-linux-x86_64 && \
phantomjs --version
# Create app directory
RUN mkdir -p /usr/src/app
COPY . /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
RUN cd /usr/src/app && yarn install --production
EXPOSE 3000
CMD yarn start