-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathDockerfile.base
51 lines (51 loc) · 1.45 KB
/
Dockerfile.base
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
FROM --platform=amd64 ubuntu:20.04
LABEL maintainer="Sugar [email protected]"
ARG nodever="20.16.0"
ARG webster_ver="latest"
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai
RUN apt-get update && apt-get install -y \
curl \
gpg \
wget \
git \
ca-certificates \
libx11-xcb1 \
libxcb1 \
libxcb-dri3-0 \
libxcomposite1 \
libxdamage1 \
libxi6 \
libxtst6 \
libnss3 \
libcups2 \
libxss1 \
libxrandr2 \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libpangocairo-1.0-0 \
libgtk-3-0 \
libgbm1 \
libxshmfence1 \
libgles2-mesa \
xvfb \
&& rm -rf /var/lib/apt/lists/*
RUN adduser work
RUN wget https://nodejs.org/dist/v${nodever}/node-v${nodever}-linux-x64.tar.xz \
-O /home/work/node-v${nodever}-linux-x64.tar.xz \
&& xz -d /home/work/node-v${nodever}-linux-x64.tar.xz \
&& tar -xvf /home/work/node-v${nodever}-linux-x64.tar -C /home/work/ \
&& mv /home/work/node-v${nodever}-linux-x64 /home/work/nodejs \
&& ln -s /home/work/nodejs/bin/node /usr/local/bin/node \
&& ln -s /home/work/nodejs/bin/npm /usr/local/bin/npm \
&& ln -s /home/work/nodejs/bin/npx /usr/local/bin/npx \
&& rm /home/work/node-v${nodever}-linux-x64.tar
RUN npm install -g npm
RUN npx playwright install-deps
USER work
RUN mkdir /home/work/webster_runtime
WORKDIR /home/work/webster_runtime
RUN npm init -y
RUN npm i --save webster@${webster_ver}
RUN npx playwright install