-
Notifications
You must be signed in to change notification settings - Fork 70
/
Dockerfile
30 lines (21 loc) · 665 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
FROM browserless/base:latest
# Application parameters and variables
ENV DEBIAN_FRONTEND=noninteractive
ENV APP_DIR=/home/node/app
ENV LANG="C.UTF-8"
ENV CC=clang
ENV CXX=clang++
ENV PUPPETEER_SKIP_CHROME_HEADLESS_SHELL_DOWNLOAD=true
ENV NODE_OPTIONS='--no-deprecation'
# install node20
RUN . $NVM_DIR/nvm.sh && nvm_dir="${NVM_DIR:-~/.nvm}" && nvm unload && rm -rf "$nvm_dir"
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && apt-get install -y nodejs
# install pnpm
RUN npm install -g pnpm
WORKDIR $APP_DIR
COPY package.json .npmrc .puppeteerrc.js ./
RUN pnpm install --prod
COPY . .
USER blessuser
EXPOSE 3000
CMD ["node", "src/server.js"]