-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.combined
More file actions
47 lines (38 loc) · 1.27 KB
/
Dockerfile.combined
File metadata and controls
47 lines (38 loc) · 1.27 KB
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
45
46
47
# ---- Build general engine ----
FROM golang:1.25-alpine AS general-builder
WORKDIR /app/general
COPY general/go.mod general/go.sum ./
RUN go mod download
COPY general/ .
RUN go build -o general_engine ./cmd/server
# ---- Build face service ----
FROM golang:1.25-bookworm AS face-builder
WORKDIR /app/face
COPY asguard-face/go.mod asguard-face/go.sum ./
RUN go mod download
COPY asguard-face/ .
# Note: face service already includes models via volume; we'll copy them later
RUN CGO_ENABLED=1 GOOS=linux go build -o face_service .
# ---- Build proxy ----
FROM golang:1.25-alpine AS proxy-builder
WORKDIR /app
COPY proxy.go .
RUN go build -o proxy proxy.go
# ---- Final image ----
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates libdlib19.1 libopenblas0 liblapack3 libjpeg62-turbo \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /root/
# Copy binaries
COPY --from=general-builder /app/general/general_engine .
COPY --from=face-builder /app/face/face_service .
COPY --from=proxy-builder /app/proxy .
# Copy face models (from your asguard-face folder)
COPY asguard-face/models ./models/
# Copy entrypoint
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
# Expose the proxy port (Render will use this)
EXPOSE 8080
CMD ["./entrypoint.sh"]