-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (34 loc) · 1.67 KB
/
Copy pathDockerfile
File metadata and controls
35 lines (34 loc) · 1.67 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
# context-guru-proxy: the LLM-proxy integration and eval-containers gateway.
#
# The module uses a local `replace github.com/maximhq/bifrost/core => ../bifrost/core`,
# so the build context MUST be the PARENT directory that contains both repos:
#
# docker build -f lab-context-engineering/Dockerfile -t context-guru-proxy .
#
# (run from .../context-engineering/). CI that builds standalone should either
# `go mod vendor` first or switch the replace to a pinned published bifrost.
#
# CGO is required (tree-sitter for the skeleton component), so the final image is
# glibc-based. It also carries a shell + curl for the eval-containers
# start/health scripts under /opt/gateway.
FROM golang:1.26 AS build
WORKDIR /src
COPY bifrost/ ./bifrost/
COPY lab-context-engineering/ ./lab-context-engineering/
WORKDIR /src/lab-context-engineering
ARG VERSION=dev
ARG COMMIT=none
RUN CGO_ENABLED=1 go build \
-ldflags "-s -w -X github.com/rossoctl/context-guru/internal/buildinfo.Version=${VERSION} -X github.com/rossoctl/context-guru/internal/buildinfo.Commit=${COMMIT}" \
-o /out/context-guru-proxy ./cmd/context-guru-proxy
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /out/context-guru-proxy /opt/gateway/main
COPY lab-context-engineering/deploy/eval-containers/start /opt/gateway/start
COPY lab-context-engineering/deploy/eval-containers/health /opt/gateway/health
RUN chmod +x /opt/gateway/start /opt/gateway/health
EXPOSE 4000
# Default entrypoint is the eval-containers gateway wrapper; override with
# `/opt/gateway/main` to run the proxy directly with flags.
ENTRYPOINT ["/opt/gateway/start"]