You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
430 B
18 lines
430 B
# Build step
|
|
FROM golang:1.18-alpine AS builder
|
|
ENV GOPROXY=https://goproxy.cn,direct
|
|
RUN mkdir -p /build
|
|
WORKDIR /build
|
|
COPY . .
|
|
RUN go build
|
|
|
|
# Final step
|
|
FROM debian:buster-slim
|
|
RUN set -x && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
ca-certificates && \
|
|
rm -rf /var/lib/apt/lists/* \
|
|
|
|
EXPOSE 8080
|
|
WORKDIR /app
|
|
COPY --from=builder /build/main /app/api2gpt-mid
|
|
ENTRYPOINT ["/app/api2gpt-mid"] |