-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOlddockerfile
More file actions
124 lines (109 loc) · 6 KB
/
Olddockerfile
File metadata and controls
124 lines (109 loc) · 6 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#Use and existing docker image as a base
#FROM node:12-alpine
#RUN apk add --no-cache font-noto-thai && apk add --no-cache chromium --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main
#FROM node:16-alpine
#RUN apk update \
# && apk upgrade \
# && echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" > /etc/apk/repositories \
# && echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
# && echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
# && apk add --no-cache \
# udev \
# ttf-freefont \
# font-noto-thai \
# chromium
#RUN apk add --no-cache font-noto-thai && apk add --no-cache chromium --repository=http://dl-cdn.alpinelinux.org/alpine/v3.11/community
#WORKDIR '/app'
#COPY package*.json ./
#RUN npm install
#ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
# PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
#RUN npm install puppeteer@3.0.0
# If you are building your code for production
# RUN npm ci --only=production
#COPY . .
#CMD ["npm","run","dev"]
FROM node:18-alpine
#FROM node:16-alpine3.11
#ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
# PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
#RUN apk add --no-cache wget build-base --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main
#RUN wget https://github.com/libevent/libevent/releases/download/release-2.1.10-stable/libevent-2.1.10-stable.tar.gz
#RUN tar xvfz libevent-2.1.10-stable.tar.gz
#RUN
#RUN tar xvfz libevent-2.1.10-stable.tar.gz && cd libevent-2.1.10-stable && ./configure --prefix=/usr/local/libevent/2_1_10 && make && make install
#RUN
#RUN make install
#RUN ln -s /usr/lib/libevent-2.1.so.6
#RUN ln -s /usr/lib/libevent-2.1.so.6 /usr/lib64/libevent-2.1.so.6
# ln -s /usr/local/libevent/2_1_10/bin/event_rpcgen.py /usr/local/bin/
# /usr/local/include
#RUN ln -s /usr/local/libevent/2_1_10/include/evdns.h /usr/local/include/
#RUN ln -s /usr/local/libevent/2_1_10/include/event2 /usr/local/include/
#RUN ln -s /usr/local/libevent/2_1_10/include/event.h /usr/local/include/
#RUN ln -s /usr/local/libevent/2_1_10/include/evhttp.h /usr/local/include/
#RUN ln -s /usr/local/libevent/2_1_10/include/evrpc.h /usr/local/include/
#RUN ln -s /usr/local/libevent/2_1_10/include/evutil.h /usr/local/include/
# /usr/local/lib
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent-2.1.so.6 /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent-2.1.so.6.0.4 /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent.a /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent.a /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_core-2.1.so.6 /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_core-2.1.so.6.0.4 /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_core.a /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_core.la /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_core.so /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_extra-2.1.so.6 /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_extra-2.1.so.6.0.4 /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_extra.a /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_extra.la /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_extra.so /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent.la /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_openssl-2.1.so.6 /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_openssl-2.1.so.6.0.4 /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_openssl.a /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_openssl.la /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_openssl.so /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_pthreads-2.1.so.6 /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_pthreads-2.1.so.6.0.4 /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_pthreads.a /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_pthreads.la /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent_pthreads.so /usr/local/lib/
#RUN ln -s /usr/local/libevent/2_1_10/lib/libevent.so /usr/local/lib/
# /usr/local/lib/pkgconfig
#RUN ln -s /usr/local/libevent/2_1_10/lib/pkgconfig/libevent_core.pc /usr/local/lib/pkgconfig/
#RUN ln -s /usr/local/libevent/2_1_10/lib/pkgconfig/libevent_extra.pc /usr/local/lib/pkgconfig/
#RUN ln -s /usr/local/libevent/2_1_10/lib/pkgconfig/libevent_openssl.pc /usr/local/lib/pkgconfig/
#RUN ln -s /usr/local/libevent/2_1_10/lib/pkgconfig/libevent.pc /usr/local/lib/pkgconfig/
#RUN ln -s /usr/local/libevent/2_1_10/lib/pkgconfig/libevent_pthreads.pc /usr/local/lib/pkgconfig/
#RUN ln -s /usr/local/lib/libevent-2.1.so.6 /usr/lib/libevent-2.1.so.6
#RUN mkdir /usr/lib64 && ln -s /usr/local/lib/libevent-2.1.so.6 /usr/lib64/libevent-2.1.so.6
RUN apk add --no-cache font-noto-thai && apk add --no-cache libevent libevent-dev chromium --repository=http://dl-cdn.alpinelinux.org/alpine/v3.11/community
#RUN apk add --no-cache font-noto-thai && apk add --no-cache libevent libevent-dev chromium
# Google fonts
#RUN wget https://github.com/google/fonts/archive/main.tar.gz -O gf.tar.gz
#RUN tar -xf gf.tar.gz
#RUN mkdir -p /usr/share/fonts/truetype/google-fonts
#RUN find $PWD/fonts-main/ -name "*.ttf" -exec install -m644 {} /usr/share/fonts/truetype/google-fonts/ \; || return 1
#RUN rm -f gf.tar.gz
#RUN fc-cache -f && rm -rf /var/cache/*
WORKDIR '/app'
COPY ./Mitr-Regular.ttf ./
RUN mkdir -p /usr/share/fonts/truetype/
RUN install -m644 Mitr-Regular.ttf /usr/share/fonts/truetype/
RUN rm ./Mitr-Regular.ttf
RUN npm install -g pnpm
COPY package*.json ./
COPY pnpm-*.yaml ./
RUN pnpm fetch --prod
ADD . ./
#RUN pnpm install -r --offline --prod
RUN pnpm install
RUN pnpm install puppeteer@14.4.1
#RUN pnpm install -r --prod
#RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
#COPY . .
CMD ["npm","run","dev"]