Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +7 -3
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
FROM node:20
|
2 |
-
|
3 |
# Create a non-root user
|
4 |
RUN useradd -m appuser
|
5 |
|
@@ -9,17 +9,21 @@ WORKDIR /home/appuser/react-video-editor
|
|
9 |
# Clone the code repository
|
10 |
RUN git clone https://github.com/designcombo/react-video-editor.git .
|
11 |
|
12 |
-
# Change ownership of the
|
13 |
RUN chown -R appuser:appuser /home/appuser/react-video-editor
|
14 |
|
15 |
# Switch to the non-root user
|
16 |
USER appuser
|
17 |
|
18 |
-
|
|
|
19 |
|
20 |
# Install dependencies
|
21 |
RUN pnpm install
|
22 |
|
|
|
|
|
|
|
23 |
# Expose the port
|
24 |
EXPOSE 3000
|
25 |
ENV PORT 3000
|
|
|
1 |
FROM node:20
|
2 |
+
|
3 |
# Create a non-root user
|
4 |
RUN useradd -m appuser
|
5 |
|
|
|
9 |
# Clone the code repository
|
10 |
RUN git clone https://github.com/designcombo/react-video-editor.git .
|
11 |
|
12 |
+
# Change ownership of the entire project directory
|
13 |
RUN chown -R appuser:appuser /home/appuser/react-video-editor
|
14 |
|
15 |
# Switch to the non-root user
|
16 |
USER appuser
|
17 |
|
18 |
+
# Install pnpm
|
19 |
+
RUN npm install -g pnpm
|
20 |
|
21 |
# Install dependencies
|
22 |
RUN pnpm install
|
23 |
|
24 |
+
# Set permissions for the working directory
|
25 |
+
RUN chmod -R 755 /home/appuser/react-video-editor
|
26 |
+
|
27 |
# Expose the port
|
28 |
EXPOSE 3000
|
29 |
ENV PORT 3000
|