Luis123321 commited on
Commit
697bb7f
·
verified ·
1 Parent(s): 41521a1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -6
Dockerfile CHANGED
@@ -1,27 +1,37 @@
1
  # --- Stage 1: Builder ---
2
  FROM golang:alpine AS builder
 
3
  RUN apk add --no-cache git make
4
  WORKDIR /app
 
 
5
  RUN git clone https://github.com/sipeed/picoclaw.git .
 
 
6
  RUN make build
7
 
8
  # --- Stage 2: Runtime ---
9
  FROM alpine:latest
10
 
11
- # Python wird für den Dummy-Server benötigt!
12
  RUN apk add --no-cache ca-certificates libc6-compat python3
13
 
14
  WORKDIR /root/
15
 
16
- # Binary kopieren
17
  COPY --from=builder /app/build/picoclaw .
18
 
19
- # [WICHTIG] Start-Script kopieren und ausführbar machen
20
- COPY start.sh .
 
 
 
 
 
21
  RUN chmod +x start.sh
22
 
23
- # Port 7860 für Hugging Face freigeben
24
  EXPOSE 7860
25
 
26
- # Das Script als Startbefehl nutzen
27
  CMD ["./start.sh"]
 
1
  # --- Stage 1: Builder ---
2
  FROM golang:alpine AS builder
3
+
4
  RUN apk add --no-cache git make
5
  WORKDIR /app
6
+
7
+ # Repo klonen
8
  RUN git clone https://github.com/sipeed/picoclaw.git .
9
+
10
+ # Bauen
11
  RUN make build
12
 
13
  # --- Stage 2: Runtime ---
14
  FROM alpine:latest
15
 
16
+ # Python installieren (für den Fake-Webserver)
17
  RUN apk add --no-cache ca-certificates libc6-compat python3
18
 
19
  WORKDIR /root/
20
 
21
+ # Binary holen
22
  COPY --from=builder /app/build/picoclaw .
23
 
24
+ # [FIX] Wir schreiben das Start-Script direkt hier rein.
25
+ # Das verhindert den "File not found"-Fehler.
26
+ RUN printf '#!/bin/sh\n\
27
+ python3 -m http.server 7860 &\n\
28
+ ./picoclaw gateway\n' > start.sh
29
+
30
+ # Ausführbar machen
31
  RUN chmod +x start.sh
32
 
33
+ # Port exposen
34
  EXPOSE 7860
35
 
36
+ # Starten
37
  CMD ["./start.sh"]