Download Dockerfile from rexcloaa/ca_rexcc: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/spaces/rexcloaa/ca_rexcc/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/rexcloaa/ca_rexcc/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/rexcloaa/ca_rexcc/resolve/main/Dockerfile
1.13 kB
| FROM golang:1.23-alpine AS builder | |
| # 构建执行文件 | |
| WORKDIR /app | |
| RUN apk add git make && git clone https://github.com/bincooo/chatgpt-adapter.git -b main . | |
| RUN make install | |
| # RUN make | |
| RUN make build-linux | |
| # RUN make build-osx | |
| # RUN make build-win | |
| FROM ubuntu:latest | |
| RUN apt update \ | |
| && apt-get install -y curl unzip wget gnupg2 tree | |
| WORKDIR /app | |
| COPY --from=builder /app/bin/linux/server ./server | |
| ADD config.yaml . | |
| RUN chmod +x server | |
| # Install google | |
| RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \ | |
| && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \ | |
| && apt-get update \ | |
| && apt-get install -y google-chrome-stable | |
| RUN google-chrome-stable --version | |
| # 下载过盾文件 | |
| RUN curl -JLO https://raw.githubusercontent.com/bincooo/chatgpt-adapter/refs/heads/hel/bin.zip | |
| RUN unzip bin.zip && tree . | |
| RUN mkdir log && chmod -R 777 /app | |
| ENV ARG "--port 7860" | |
| # 启动服务器并保持活跃 | |
| CMD ["sh", "-c", "./server ${ARG} & while true; do curl -s http://localhost:7860 > /dev/null; sleep 1800; done"] |