Gertie01 commited on
Commit
f43cffe
·
verified ·
1 Parent(s): 787c5ba

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18-slim
2
+
3
+ # Set up user with ID 1000
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV HOME=/home/user \
7
+ PATH=/home/user/.local/bin:$PATH
8
+
9
+ # Set working directory
10
+ WORKDIR $HOME/app
11
+
12
+ # Copy package files with proper ownership
13
+ COPY --chown=user package*.json ./
14
+
15
+ # Install dependencies
16
+ RUN npm install
17
+
18
+ # Copy rest of the application with proper ownership
19
+ COPY --chown=user . .
20
+
21
+ # Build the Next.js app
22
+ RUN npm run build
23
+
24
+ # Expose port 7860
25
+ EXPOSE 7860
26
+
27
+ # Start the application on port 7860
28
+ CMD ["npm", "start", "--", "-p", "7860"]