-
Notifications
You must be signed in to change notification settings - Fork 62
/
Dockerfile
39 lines (31 loc) · 1.29 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
FROM cypress/base:16.3.0
ENV NPM_CONFIG_LOGLEVEL warn
ENV NPM_CONFIG_UNSAFE_PERM true
ENV TERM xterm
ENV CHROME_VERSION 130.0.6723.91-1
RUN apt-get update
# Install common dependencies
RUN apt-get install -y \
tzdata \
wget \
curl \
make \
git
# Fix error when libpng cannot be found after CircleCI restores cache for pngquant-bin.
# See https://github.com/tcoopman/image-webpack-loader/issues/95
RUN wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb \
&& dpkg -i /tmp/libpng12.deb \
&& rm /tmp/libpng12.deb
# Install Chrome (Version 106)
# See all available versions for download on: https://www.ubuntuupdates.org/package_logs?type=ppas&vals=8
RUN apt-get install -y xvfb xdg-utils libu2f-udev libvulkan1 libgtk-3-0 lsb-release libappindicator3-1 fonts-liberation libasound2 libnspr4 libnss3 libgbm1 \
&& curl https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb -O \
&& dpkg -i google-chrome-stable_${CHROME_VERSION}_amd64.deb \
&& rm google-chrome-stable_${CHROME_VERSION}_amd64.deb \
&& google-chrome --version
WORKDIR /code
# Install dev packages
COPY package.json .
COPY package-lock.json .
RUN npm install
COPY . /code