更新下载最新版本
Browse files- Dockerfile +24 -22
Dockerfile
CHANGED
|
@@ -1,22 +1,24 @@
|
|
| 1 |
-
FROM debian:bookworm-slim
|
| 2 |
-
|
| 3 |
-
WORKDIR /app
|
| 4 |
-
|
| 5 |
-
RUN apt-get update && \
|
| 6 |
-
apt-get install -y wget ca-certificates && \
|
| 7 |
-
rm -rf /var/lib/apt/lists/*
|
| 8 |
-
|
| 9 |
-
# Download latest CLI Proxy API
|
| 10 |
-
RUN
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM debian:bookworm-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
RUN apt-get update && \
|
| 6 |
+
apt-get install -y wget ca-certificates curl jq && \
|
| 7 |
+
rm -rf /var/lib/apt/lists/*
|
| 8 |
+
|
| 9 |
+
# Download latest CLI Proxy API for Linux
|
| 10 |
+
RUN LATEST_URL=$(curl -s https://api.github.com/repos/router-for-me/CLIProxyAPI/releases/latest | jq -r '.assets[] | select(.name | test("linux.*amd64.*tar.gz")) | .browser_download_url') && \
|
| 11 |
+
echo "Downloading: $LATEST_URL" && \
|
| 12 |
+
wget -q "$LATEST_URL" -O cli-proxy-api.tar.gz && \
|
| 13 |
+
tar -xzf cli-proxy-api.tar.gz && \
|
| 14 |
+
find . -name "cli-proxy-api" -type f -exec mv {} /app/cli-proxy-api \; && \
|
| 15 |
+
rm -rf cli-proxy-api.tar.gz CLIProxyAPI* && \
|
| 16 |
+
chmod +x /app/cli-proxy-api
|
| 17 |
+
|
| 18 |
+
# Copy config and auth files
|
| 19 |
+
COPY config.yaml /app/config.yaml
|
| 20 |
+
COPY auths /app/auths
|
| 21 |
+
|
| 22 |
+
EXPOSE 7860
|
| 23 |
+
|
| 24 |
+
CMD ["./cli-proxy-api", "-config", "config.yaml"]
|