Skip to content

fix(build): make the documented docker build work standalone - #62

Merged
OsherElhadad merged 1 commit into
rossoctl:mainfrom
itay-nakash:fix/standalone-docker-build
Aug 12, 2026
Merged

fix(build): make the documented docker build work standalone#62
OsherElhadad merged 1 commit into
rossoctl:mainfrom
itay-nakash:fix/standalone-docker-build

Conversation

@itay-nakash

Copy link
Copy Markdown
Collaborator

README.md and docs/setup.md both tell you to build the image with

docker build -t context-guru:local .

from the repo root. That command cannot work, and this PR makes it work.

go.mod pins bifrost as an ordinary published dependency:

require github.com/maximhq/bifrost/core v1.7.0

There is no replace directive, and docs/setup.md already says so. But the
Dockerfile was still written for the old layout, and not only in comments:

COPY bifrost/ ./bifrost/                    # a directory that need not exist
COPY lab-context-engineering/ ./lab-context-engineering/
WORKDIR /src/lab-context-engineering

So the image could only be built from a PARENT directory holding a sibling
bifrost checkout, while two places in the repo documented the opposite. Run the
documented command today and the first COPY fails. That is the justification for
this change: the two halves of the repo disagreed, and the documented path was
the losing one.

What changes, per file:

  • Dockerfile, the only functional change. The build context becomes the repo
    (COPY . .), the WORKDIR /src/lab-context-engineering line goes away, and the
    two runtime-stage COPY lab-context-engineering/deploy/... paths become
    deploy/.... The header comment now documents the same command README does.
  • deploy/eval-containers/README.md drops the
    cd .../context-engineering + -f lab-context-engineering/Dockerfile
    incantation for a plain docker build -t context-guru-proxy:latest .. It also
    deletes a "Known gaps (tracked, P5)" bullet that is now factually resolved:
    "The image build needs the parent-dir context (or go mod vendor) until bifrost
    is pinned to a published version." bifrost IS pinned, so the gap no longer
    exists. If that bullet maps to a real P5 ticket, the ticket should be closed
    too.
  • examples/llm-d-service/README.md removes the sibling-checkout prerequisite and
    its ASCII directory-layout block, replaced by one line saying the repo builds
    standalone from a plain clone.
  • examples/llm-d-service/build.sh is a comment-only change. The go build line
    always worked; the comment just told you to go set up a sibling checkout first.

Net -15 lines. It deletes stale claims and corrects paths; it adds no new
mechanism, no Go code, and nothing that can move a benchmark number.

Verification, both directions executed rather than reasoned about:

new Dockerfile, docker build from the repo root   rc=0, 14/14 steps, 192 MB
OLD Dockerfile, same command                      rc=1, COPY failed:
                                                  stat bifrost/: file does
                                                  not exist
/opt/gateway/{main,start,health} in the image      all three, executable
CGO binary runs on debian:bookworm-slim            yes (no missing libs)
default ENTRYPOINT /opt/gateway/start              runs, demands EVAL_MODEL
                                                   (its own contract)
/opt/gateway/main + GET /healthz                   ok
the image's own /opt/gateway/health                rc=0
make lint / make test / make build                 pass

Also checked against the current tree rather than the tree this was written on:
the dashboard added in #30/#58 ships its UI through //go:embed in dash/ui.go, so
COPY . . covers it and the runtime stage needs nothing extra.

Two things deliberately left out, both reasonable review requests:

  • There is still no .dockerignore, so COPY . . sends the whole working tree to
    the daemon (including bin/ and coverage.out if present). Harmless for a
    multi-stage build -- the final image receives only the compiled binary plus the
    two scripts -- but adding one would speed the build. Left out to keep this
    commit to one concern.
  • CI does not build the image at all: .github/workflows/ci.yaml runs make lint,
    make cover, make build and a Trivy scan. So nothing in CI would have caught the
    original breakage, and nothing will validate this fix automatically either.

go.mod has pinned bifrost as an ordinary published dependency (core v1.7.0)
with no replace directive, but the Dockerfile and three docs still described a
sibling bifrost checkout and a parent-directory build context.

This was not merely stale prose: the Dockerfile COPYs bifrost/ and
lab-context-engineering/, so it could only build from a parent directory holding
a bifrost checkout that no longer needs to exist. Meanwhile README.md and
docs/setup.md both tell users to run "docker build -t context-guru:local ."
from the repo root, which that Dockerfile could not satisfy.

Point the build context at the repo (COPY . .), fix the two COPY paths in the
runtime stage, and drop the sibling-checkout prerequisite from
examples/llm-d-service/{README.md,build.sh} and
deploy/eval-containers/README.md -- including the now-resolved "known gap"
about needing a parent-dir context until bifrost is pinned.

Verified a plain clone with no sibling bifrost builds both ways:
CGO_ENABLED=1 go build ./cmd/context-guru-proxy, and the same with
-tags cg_skeleton. The Dockerfile COPY paths are all present in a clean clone;
the image build itself was not run here (no disk on the local docker VM).

Assisted-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Itay-Nakash <itay.nakash@ibm.com>
@OsherElhadad
OsherElhadad merged commit 6ecc12a into rossoctl:main Aug 12, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Aug 12, 2026
@itay-nakash
itay-nakash deleted the fix/standalone-docker-build branch August 12, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants