kek commited on
Commit ·
c481fdd
1
Parent(s): 189c732
Try Go 1.22 + Alpine sh compatibility
Browse files- Dockerfile +2 -7
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# 1. Schritt: Build des Go-Proxys
|
| 2 |
-
FROM golang:1.
|
| 3 |
WORKDIR /app
|
| 4 |
COPY . .
|
| 5 |
RUN go mod download
|
|
@@ -9,22 +9,17 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /app/cliproxy ./cmd/server/
|
|
| 9 |
FROM alpine:latest
|
| 10 |
RUN apk add --no-cache ca-certificates bash
|
| 11 |
|
| 12 |
-
# Arbeitsverzeichnis
|
| 13 |
WORKDIR /app
|
| 14 |
|
| 15 |
-
# Kopiere den Proxy, die Config und den statischen Web-Ordner
|
| 16 |
COPY --from=builder /app/cliproxy /app/cliproxy
|
| 17 |
COPY config.yaml /app/config.yaml
|
| 18 |
COPY static /app/static
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
RUN echo "#!/bin/bash" > /start.sh && \
|
| 22 |
echo "Starting CLI Proxy API on Port 7860..." >> /start.sh && \
|
| 23 |
echo "exec /app/cliproxy -config /app/config.yaml" >> /start.sh && \
|
| 24 |
chmod +x /start.sh
|
| 25 |
|
| 26 |
-
# Port 7860 ist Pflicht für Hugging Face
|
| 27 |
EXPOSE 7860
|
| 28 |
|
| 29 |
-
# Proxy starten
|
| 30 |
ENTRYPOINT ["/start.sh"]
|
|
|
|
| 1 |
# 1. Schritt: Build des Go-Proxys
|
| 2 |
+
FROM golang:1.22-alpine AS builder
|
| 3 |
WORKDIR /app
|
| 4 |
COPY . .
|
| 5 |
RUN go mod download
|
|
|
|
| 9 |
FROM alpine:latest
|
| 10 |
RUN apk add --no-cache ca-certificates bash
|
| 11 |
|
|
|
|
| 12 |
WORKDIR /app
|
| 13 |
|
|
|
|
| 14 |
COPY --from=builder /app/cliproxy /app/cliproxy
|
| 15 |
COPY config.yaml /app/config.yaml
|
| 16 |
COPY static /app/static
|
| 17 |
|
| 18 |
+
RUN echo "#!/bin/sh" > /start.sh && \
|
|
|
|
| 19 |
echo "Starting CLI Proxy API on Port 7860..." >> /start.sh && \
|
| 20 |
echo "exec /app/cliproxy -config /app/config.yaml" >> /start.sh && \
|
| 21 |
chmod +x /start.sh
|
| 22 |
|
|
|
|
| 23 |
EXPOSE 7860
|
| 24 |
|
|
|
|
| 25 |
ENTRYPOINT ["/start.sh"]
|