-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
38 lines (31 loc) · 984 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
38
#
# Dockerfile for reader-webview
#
FROM alpine as source
COPY --from=hectorqin/remote-webview /app /app
WORKDIR /app
RUN set -ex \
&& rm -rf .git* .dockerignore Dockerfile node_modules \
&& cat package.json | grep -e name -e version | sed -e 's/^[[:space:]]\+//g;s/"//g;s/,//g' \
&& ls -al
FROM ubuntu:jammy
COPY --from=source /app /app
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NOWARNINGS=yes
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
ENV PLAYWRIGHT_SKIP_BROWSER_GC=1
WORKDIR /app
RUN set -ex \
&& apt-get update && apt-get install -y \
curl wget gpg tini \
&& curl -sL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& apt-get purge -y curl wget gpg \
&& npm install \
&& npx playwright install --with-deps webkit \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /tmp/* /var/lib/apt/lists/* /root/.npm/*
EXPOSE 8050
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["node","index.js"]