forked from labring/aiproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (23 loc) · 752 Bytes
/
Dockerfile
File metadata and controls
44 lines (23 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM node:22-alpine AS frontend-builder
WORKDIR /aiproxy/web
COPY ./web/ ./
RUN npm install -g pnpm
RUN pnpm install && pnpm run build
FROM golang:1.25.2-alpine AS builder
WORKDIR /aiproxy/core
COPY ./ /aiproxy
COPY --from=frontend-builder /aiproxy/web/dist/ /aiproxy/core/public/dist/
RUN go install github.com/swaggo/swag/cmd/swag@latest
RUN sh scripts/swag.sh
RUN go build -trimpath -ldflags "-s -w" -o aiproxy
FROM alpine:latest
RUN mkdir -p /aiproxy
WORKDIR /aiproxy
VOLUME /aiproxy
RUN apk add --no-cache ca-certificates tzdata ffmpeg curl && \
rm -rf /var/cache/apk/*
COPY --from=builder /aiproxy/core/aiproxy /usr/local/bin/aiproxy
ENV PUID=0 PGID=0 UMASK=022
ENV FFMPEG_ENABLED=true
EXPOSE 3000
ENTRYPOINT ["aiproxy"]