File size: 570 Bytes
2013feb 0f49879 2013feb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
FROM rust:1.65 as builder
RUN apt-get update && apt-get install -y git
RUN git clone https://github.com/fuergaosi233/chatgpt-proxy-server.git
RUN cargo new --bin app
WORKDIR /app
COPY Cargo.toml Cargo.toml
# Dry running build command to make Docker cache layer
RUN cargo build --release
RUN rm src/*.rs
COPY src src
RUN cargo build --release
# Use slim image to place build result
FROM debian:stable-slim
RUN apt-get update && apt-get install -y ca-certificates
COPY --from=builder ./app/target/release/chatgpt-proxy-server .
EXPOSE 3000
CMD ["./chatgpt-proxy-server"] |