-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
37 lines (31 loc) · 974 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
31
32
33
34
35
36
37
FROM ubuntu:focal-20211006
ARG NODE_VERSION=20.13.1
ARG DEBIAN_FRONTEND=noninteractive
ENV NODE_ENV ci
ENV TZ Europe/Brussels
ENV PATH $PATH:/usr/local/lib/nodejs/node-v${NODE_VERSION}-linux-x64/bin
RUN apt-get update \
&& apt-get install -y \
# Install node dependency
curl \
# Install node-canvas dependencies
build-essential \
libcairo2-dev \
libpango1.0-dev \
libjpeg-dev \
libgif-dev \
librsvg2-dev \
# Playwright dependency (avoids interactive mode)
tzdata \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/local/lib/nodejs \
&& curl -fsSL https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz | tar -xJ -C /usr/local/lib/nodejs \
&& npm install -g [email protected]
WORKDIR /root
COPY package.json package.json
COPY yarn.lock yarn.lock
COPY scripts scripts
RUN yarn install --frozen-lockfile \
&& yarn playwright install --with-deps chromium
COPY . .
RUN yarn build