merasabkuch commited on
Commit
2b9a274
·
verified ·
1 Parent(s): 15b6840

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -12
Dockerfile CHANGED
@@ -1,23 +1,23 @@
1
- FROM node:alpine
2
 
3
  # Install dependencies needed for Playwright
4
- RUN apk add --no-cache \
5
- git \
6
- bash \
7
- libc6-compat \
8
- nss \
9
- chromium \
10
- harfbuzz \
11
- ca-certificates \
12
- ttf-freefont
 
13
 
14
  # Switch to the node user
15
  USER node
16
 
17
  # Set environment variables for the user
18
  ENV HOME=/home/node \
19
- PATH=/home/node/.local/bin:$PATH \
20
- PLAYWRIGHT_BROWSERS_PATH=/home/node/.cache/ms-playwright
21
 
22
  # Set the working directory
23
  WORKDIR $HOME/app
 
1
+ FROM node:18-bullseye-slim
2
 
3
  # Install dependencies needed for Playwright
4
+ RUN apt-get update && \
5
+ apt-get install -y wget gnupg ca-certificates && \
6
+ wget -q -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
7
+ wget -q -O - https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
8
+ echo "deb https://deb.nodesource.com/node_18.x bullseye main" > /etc/apt/sources.list.d/nodesource.list && \
9
+ echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \
10
+ apt-get update && \
11
+ apt-get install -y git libnss3 libcups2 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libasound2 fonts-freefont-ttf && \
12
+ apt-get clean && \
13
+ rm -rf /var/lib/apt/lists/*
14
 
15
  # Switch to the node user
16
  USER node
17
 
18
  # Set environment variables for the user
19
  ENV HOME=/home/node \
20
+ PATH=/home/node/.local/bin:$PATH
 
21
 
22
  # Set the working directory
23
  WORKDIR $HOME/app