Upload Dockerfile
Browse files- Dockerfile +41 -0
Dockerfile
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM golang:1.21-alpine AS builder
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
RUN apk add git make && git clone https://github.com/bincooo/chatgpt-adapter.git .
|
| 5 |
+
RUN make build-linux
|
| 6 |
+
|
| 7 |
+
FROM ubuntu:latest
|
| 8 |
+
|
| 9 |
+
WORKDIR /app
|
| 10 |
+
COPY server .
|
| 11 |
+
COPY --from=builder /app/you-helper.zip ./you-helper.zip
|
| 12 |
+
|
| 13 |
+
RUN apt update \
|
| 14 |
+
&& apt-get install -y curl unzip wget gnupg2
|
| 15 |
+
|
| 16 |
+
RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
| 17 |
+
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
|
| 18 |
+
&& apt-get update \
|
| 19 |
+
&& apt-get install -y google-chrome-stable
|
| 20 |
+
|
| 21 |
+
# Install Edge (commented out for now)
|
| 22 |
+
#RUN wget -q -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg >/dev/null \
|
| 23 |
+
# && echo "deb https://packages.microsoft.com/repos/edge stable main" >> /etc/apt/sources.list.d/microsoft-edge.list \
|
| 24 |
+
# && apt-get update -qqy \
|
| 25 |
+
# && apt-get -qqy --no-install-recommends install microsoft-edge-stable
|
| 26 |
+
RUN chmod +x server
|
| 27 |
+
|
| 28 |
+
RUN unzip ./you-helper.zip \
|
| 29 |
+
&& mkdir log tmp \
|
| 30 |
+
&& chmod 777 log \
|
| 31 |
+
&& chmod 777 tmp \
|
| 32 |
+
&& chmod +x server \
|
| 33 |
+
&& chmod +x bin/linux/helper \
|
| 34 |
+
&& chmod -R 777 /app
|
| 35 |
+
|
| 36 |
+
COPY launch.sh /app/launch.sh
|
| 37 |
+
RUN chmod +x /app/launch.sh
|
| 38 |
+
|
| 39 |
+
CMD ["/app/launch.sh"]
|
| 40 |
+
|
| 41 |
+
ENTRYPOINT ["sh", "-c"]
|