Spaces:
Runtime error
Runtime error
Upload Dockerfile
Browse files- Dockerfile +12 -12
Dockerfile
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
-
FROM node:
|
2 |
|
3 |
# Install dependencies needed for Playwright
|
4 |
-
RUN
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
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
|