ransxd1/DEMO
0
1FROM golang:1.23-alpine AS builder2 3# 构建执行文件4WORKDIR /app5RUN apk add git make && git clone https://github.com/bincooo/chatgpt-adapter.git -b main .6RUN make install7# RUN make8RUN make build-linux9# RUN make build-osx10# RUN make build-win11 12FROM ubuntu:latest13 14RUN apt update \15 && apt-get install -y curl unzip wget gnupg2 tree16 17WORKDIR /app18COPY --from=builder /app/bin/linux/server ./server19ADD config.yaml .20RUN chmod +x server21 22# Install google23RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \24 && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \25 && apt-get update \26 && apt-get install -y google-chrome-stable27RUN google-chrome-stable --version28 29# 下载过盾文件30RUN curl -JLO https://raw.githubusercontent.com/bincooo/chatgpt-adapter/refs/heads/hel/bin.zip31RUN unzip bin.zip && tree .32RUN mkdir log && chmod -R 777 /app33ENV ARG "--port 7860"34CMD ["./server ${ARG}"]35ENTRYPOINT ["sh", "-c"]