|
|
FROM golang:1.21-alpine AS builder |
|
|
|
|
|
WORKDIR /app |
|
|
RUN apk add git make && git clone https://github.com/bincooo/chatgpt-adapter.git . |
|
|
RUN make build-linux |
|
|
|
|
|
FROM ubuntu:latest |
|
|
|
|
|
WORKDIR /app |
|
|
COPY --from=builder /app/bin/linux/server ./server |
|
|
COPY --from=builder /app/bin/config.yaml ./config.yaml |
|
|
COPY --from=builder /app/you-helper.zip ./you-helper.zip |
|
|
|
|
|
RUN apt update \ |
|
|
&& apt-get install -y curl unzip wget gnupg2 |
|
|
|
|
|
|
|
|
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 unzip ./you-helper.zip \ |
|
|
&& mkdir log tmp \ |
|
|
&& chmod 777 log \ |
|
|
&& chmod 777 tmp \ |
|
|
&& chmod +x server \ |
|
|
&& chmod +x bin/linux/helper |
|
|
ADD config.yaml . |
|
|
|
|
|
ENV ARG "--port 7860" |
|
|
CMD ["./server ${ARG}"] |
|
|
ENTRYPOINT ["sh", "-c"] |