Files
dsfree2api/Dockerfile
T
nyoungo 18b2c04006 initial import
- Go service bridging deepseek.de/es/fr V4 models behind an OpenAI-compatible API
- /v1/chat/completions, /v1/responses, /v1/messages (Anthropic) with tool calling
- web admin console: dashboard, models/sites, keys, proxies, Turnstile, playground, live logs
- Turnstile solvers: solver API / local browser via CDP / manual cookie import
- MIT license, README with screenshots, Dockerfile and Makefile
2026-10-07 15:46:45 +08:00

23 lines
680 B
Docker

# syntax=docker/dockerfile:1
FROM golang:1.27-alpine AS build
WORKDIR /src
ENV CGO_ENABLED=0 GOOS=linux GOPROXY=https://goproxy.cn,https://proxy.golang.org,direct
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -trimpath -ldflags "-s -w" -o /out/dsfree2api ./cmd/dsfree2api
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata \
&& adduser -D -H -u 10001 app
WORKDIR /app
COPY --from=build /out/dsfree2api /usr/local/bin/dsfree2api
COPY config.example.toml /app/config.toml
USER app
EXPOSE 8000 8001
ENV HOST=0.0.0.0 PORT=8000 ADMIN_ENABLED=true DATA_DIR=/app/data
VOLUME ["/app/data"]
ENTRYPOINT ["dsfree2api"]
CMD ["-config", "/app/config.toml"]