fix: rewrite Dockerfile for CI build context, not monorepo#3
Merged
Conversation
The previous Dockerfile assumed the docker build context was the
beacon monorepo root directory (/data/home/davidfic/dev/beacon/),
with haul/, web-shared/, and pulse/ as sibling directories. That
works for local `docker build -f haul/docker/Dockerfile .` runs
from the monorepo root but falls over immediately in CI because
the GitHub workflow's docker build context is the haul repo root,
and none of haul/web/ui/package.json, web-shared/, or pulse/ exist
at those paths — they live at web/ui/package.json, web/ui/src/shared/
(vendored via git subtree now), and a go.mod require github.com/beacon-stack/pulse
respectively.
CI was failing with:
failed to calculate checksum of ref ...: "/web-shared": not found
failed to calculate checksum of ref ...: "/haul/web/ui/package.json": not found
Rewrites the Dockerfile to match the CI build context (haul repo
root) and to stop relying on the sibling-dir layout:
- Frontend stage copies web/ui/ directly (instead of haul/web/ui/)
- Drops the separate COPY web-shared/ step — the shared components
are vendored into web/ui/src/shared/ via git subtree, so they
come along with the rest of web/ui/.
- Drops the pulse sibling copy and the `sed` rewrite of the go.mod
replace directive. That replace directive was removed entirely
when we pinned pulse v0.1.0 via a normal require, so the Go build
stage just runs `go mod download` and `go build` with no
cross-module surgery.
- Output binary lands at /haul and gets copied into the final stage
at /usr/local/bin/haul, matching the pilot/prism conventions.
- Still uses CGO_ENABLED=0 and alpine:3.21 as before.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks haul's main-branch Docker job, which was failing on:
```
failed to calculate checksum of ref ...: "/web-shared": not found
failed to calculate checksum of ref ...: "/haul/web/ui/package.json": not found
```
What was wrong
The old Dockerfile assumed the build context was the beacon monorepo root, with `haul/`, `web-shared/`, and `pulse/` as sibling directories. It worked for local `docker build -f haul/docker/Dockerfile .` runs from the monorepo root, but CI's build context is the haul repo root and none of those paths exist there.
What this does
Test plan