-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (32 loc) · 1.12 KB
/
Dockerfile
File metadata and controls
41 lines (32 loc) · 1.12 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
FROM --platform=$BUILDPLATFORM golang:1.26.2-trixie AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
gcc-x86-64-linux-gnu libc6-dev-amd64-cross \
make ca-certificates && apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /build
COPY . .
ARG TARGETOS
ARG TARGETARCH
ENV CGO_ENABLED=1
RUN if [ "${TARGETARCH}" = "arm64" ]; then \
export CC=aarch64-linux-gnu-gcc; \
elif [ "${TARGETARCH}" = "amd64" ]; then \
export CC=x86_64-linux-gnu-gcc; \
else \
echo "Unsupported architecture: ${TARGETARCH}" && exit 1; \
fi && \
make dist GOOS=${TARGETOS} GOARCH=${TARGETARCH}
FROM debian:trixie-20260421-slim
ARG TARGETOS
ARG TARGETARCH
COPY --from=builder /build/bin/finch-${TARGETOS}-${TARGETARCH} /bin/finch
EXPOSE 3000
ENTRYPOINT ["/bin/finch"]
CMD [ \
"run", \
"--server.grpc-address", "0.0.0.0:3000", \
"--server.http-address", "0.0.0.0:3001", \
"--server.auth-address", "0.0.0.0:3002", \
"--server.healthz-address", "0.0.0.0:3003", \
"--stack.config-file", "/var/lib/finch/finch.json" \
]