srinetwork commited on
Commit
6d7d0d3
·
verified ·
1 Parent(s): 09035c1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -19
Dockerfile CHANGED
@@ -1,27 +1,11 @@
1
  FROM node:18-slim
2
 
3
- # Install git and other dependencies
4
- RUN apt-get update && apt-get install -y \
5
- git \
6
- curl \
7
- && rm -rf /var/lib/apt/lists/*
8
 
9
- # Accept build arguments from Hugging Face Secrets
10
- ARG GIT_USER
11
- ARG GITHUB_TOKEN
12
- ARG GIT_REPO
13
 
14
- # Create app directory
15
  WORKDIR /app
16
 
17
- # Clone the private repository using build arguments
18
- RUN git clone https://${GIT_USER}:${GITHUB_TOKEN}@github.com/${GIT_USER}/${GIT_REPO}.git .
19
-
20
- # Install dependencies
21
- RUN npm install
22
-
23
- # Expose Hugging Face Spaces default port
24
  EXPOSE 7860
25
 
26
- # Start the application
27
- CMD ["node", "server.js"]
 
1
  FROM node:18-slim
2
 
3
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
 
 
 
 
4
 
5
+ RUN mkdir -p /tmp/uploads && chmod 777 /tmp/uploads
 
 
 
6
 
 
7
  WORKDIR /app
8
 
 
 
 
 
 
 
 
9
  EXPOSE 7860
10
 
11
+ CMD ["sh", "-c", "git clone https://$GIT_USER:$GITHUB_TOKEN@github.com/$GIT_USER/$GIT_REPO.git . && npm install && node index.js"]