OnBhar commited on
Commit
6b0b379
·
verified ·
1 Parent(s): 87b43f1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -6
Dockerfile CHANGED
@@ -1,19 +1,22 @@
1
- # Build dashboard
2
  FROM node:20-alpine AS builder
3
 
4
  RUN apk add --no-cache git
5
- WORKDIR /app
6
 
7
- RUN git clone https://github.com/Dokploy/dokploy.git .
 
 
 
8
 
9
- WORKDIR /app/apps/dashboard
10
  RUN npm install
11
  RUN npm run build
12
 
13
- # Serve static build on HuggingFace
14
  FROM nginx:alpine
15
 
16
- COPY --from=builder /app/apps/dashboard/dist /usr/share/nginx/html
17
 
18
  EXPOSE 7860
19
 
 
1
+ # 1) Build Dokploy Dashboard
2
  FROM node:20-alpine AS builder
3
 
4
  RUN apk add --no-cache git
5
+ WORKDIR /build
6
 
7
+ # Only shallow clone dashboard folder (HuggingFace friendly)
8
+ RUN git clone --depth 1 --filter=blob:none --sparse https://github.com/Dokploy/dokploy.git
9
+ WORKDIR /build/dokploy
10
+ RUN git sparse-checkout set apps/dashboard
11
 
12
+ WORKDIR /build/dokploy/apps/dashboard
13
  RUN npm install
14
  RUN npm run build
15
 
16
+ # 2) Serve with NGINX on HuggingFace (port 7860)
17
  FROM nginx:alpine
18
 
19
+ COPY --from=builder /build/dokploy/apps/dashboard/dist /usr/share/nginx/html
20
 
21
  EXPOSE 7860
22