-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnode.dockerfile.example
More file actions
44 lines (30 loc) · 1.42 KB
/
Copy pathnode.dockerfile.example
File metadata and controls
44 lines (30 loc) · 1.42 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM node:latest
RUN apt-get -y update
# RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
# RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
# install google chrome
# RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
# ENV CHROME_VERSION=80.0.3987.100
# RUN apt-get install -y google-chrome-stable=${CHROME_VERSION}-1
# RUN google-chrome-stable --version
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install
# install chromedriver
RUN apt-get install -yqq unzip
RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
# set display port to avoid crash
ENV DISPLAY=:99
WORKDIR /var/www
COPY . /var/www
RUN apt-get install -y default-jre && npm install && npm install chromedriver && npm install chromedriver
EXPOSE 4444
ENTRYPOINT [ "npm", "run", "demo" ]
ENV EXEC_ENV=prod
ENV BACKUP_CODE=
ENV PROJECT_KEY=demo
ENV RUN_HEADLESS=true
ENV ACCESS_TOKEN=
ENV BROWSER=
ENV TIMEOUT=15