mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-06-23 21:57:19 +08:00
- Removed `examples/plugin/main.go` and `internal/pluginhost/loader_plugin.go` after migrating to a more modular system. - Introduced `streamBridge` in `internal/pluginhost/stream_bridge.go` for efficient stream handling and communication. - Added examples of `thinking` plugins written in both Rust and Go under `examples/plugin/thinking`. - Enhanced test coverage for plugin host system changes, including stream chunk translation and thinking logic. - Improved API compatibility and ensured backward-compatible upgrades for plugin execution.
38 lines
728 B
Docker
38 lines
728 B
Docker
FROM golang:1.26-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache build-base
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
ARG VERSION=dev
|
|
ARG COMMIT=none
|
|
ARG BUILD_DATE=unknown
|
|
|
|
RUN CGO_ENABLED=1 GOOS=linux go build -ldflags="-s -w -X 'main.Version=${VERSION}' -X 'main.Commit=${COMMIT}' -X 'main.BuildDate=${BUILD_DATE}'" -o ./CLIProxyAPI ./cmd/server/
|
|
|
|
FROM alpine:3.23
|
|
|
|
RUN apk add --no-cache tzdata
|
|
|
|
RUN mkdir /CLIProxyAPI
|
|
|
|
COPY --from=builder ./app/CLIProxyAPI /CLIProxyAPI/CLIProxyAPI
|
|
|
|
COPY config.example.yaml /CLIProxyAPI/config.example.yaml
|
|
|
|
WORKDIR /CLIProxyAPI
|
|
|
|
EXPOSE 8317
|
|
|
|
ENV TZ=Asia/Shanghai
|
|
|
|
RUN cp /usr/share/zoneinfo/${TZ} /etc/localtime && echo "${TZ}" > /etc/timezone
|
|
|
|
CMD ["./CLIProxyAPI"]
|