forked from dannybtran/headless-chrome-node-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (48 loc) · 1.59 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM openjdk:8
RUN apt-get update -y && \
apt-get install ca-certificates \
software-properties-common \
gconf-service \
libasound2 \
libatk1.0-0 \
libatk1.0-0 \
libdbus-1-3 \
libdrm2 \
libgbm1 \
libgconf-2-4 \
libgtk-3-0 \
libappindicator3-1 \
libnspr4 \
libnss3 \
libx11-xcb1 \
libxcb-dri3-0 \
libxss1 \
libxtst6 \
fonts-liberation \
libappindicator1 \
xdg-utils \
lsb-release \
lsof \
wget \
curl \
maven \
xz-utils -y --no-install-recommends && \
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
dpkg -i google-chrome*.deb && \
apt-get install -f && \
apt-get clean autoclean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* google-chrome-stable_current_amd64.deb
# Install nodejs
ENV NPM_CONFIG_LOGLEVEL=info NODE_VERSION=10.19.0
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
# Install yarn
ENV YARN_VERSION 1.22.4
RUN curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& mkdir -p /opt/yarn \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz