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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM node:20-slim
2
 
3
  # Install git and other dependencies
4
  RUN apt-get update && apt-get install -y \
@@ -6,11 +6,15 @@ RUN apt-get update && apt-get install -y \
6
  curl \
7
  && rm -rf /var/lib/apt/lists/*
8
 
 
 
 
 
 
9
  # Create app directory
10
  WORKDIR /app
11
 
12
- # Clone the private repository using environment variables
13
- # GIT_USER, GIT_TOKEN, and GIT_REPO should be set as Hugging Face Space secrets
14
  RUN git clone https://${GIT_USER}:${GITHUB_TOKEN}@github.com/${GIT_USER}/${GIT_REPO}.git .
15
 
16
  # Install dependencies
 
1
+ FROM node:18-slim
2
 
3
  # Install git and other dependencies
4
  RUN apt-get update && apt-get install -y \
 
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