Repository navigation
chore(migration): step 07b build Docker images from the repository ro… - #10
Merged
Merged
Conversation
…ot (R2) Record the file listings of the api, federation-api and query-tool images built the old way, rewrite their COPY lines to root-relative paths, add an allowlist Dockerfile.dockerignore per image, build from the root in the docker-build composite action, remove scripts/materialize-context.sh, add just build <tool>, and update the READMEs. Co-Authored-By: Claude Opus 5.5 <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.
Title:
chore(migration): step 07b build Docker images from the repository root (R2)Branch:
migration/step-07bCan be squash-merged or merged; it imports no history.
Summary
migration/image-files-<tool>-before.txtfor api, federation-api and query-tool, taken from images built the old way (docker build tools/<tool>for the APIs, the materialized context for query-tool) from a clean checkout ofmain.COPYlines are now root-relative.COPY tools/<tool>/pyproject.toml tools/<tool>/uv.lock ./andCOPY tools/<tool>/app /usr/src/app.COPY tools/query-tool/ .,COPY examples/ ./neurobagel_examples/andCOPY tools/query-tool/entrypoint.sh /entrypoint.sh.tools/<tool>/Dockerfile.dockerignoreper image. It starts with*and re-includes only what the image needs.app/**/__pycache__and the git-ignoredapp/_version.py.node_modules,distand theneurobagel_examplessymlink.tools/query-tool/.dockerignoreis deleted..github/actions/docker-buildbuilds withcontext: .andfile: tools/<tool>/Dockerfile.scripts/materialize-context.shand every reference to it are deleted, including the query-tool path-filter entry.just build <tool>for api, federation-api and query-tool runsdocker build -f tools/<tool>/Dockerfile -t neurobagel/<image>:local .from the root.just buildin the command list.Checks run
image-files-<tool>-before.txtGET /200 on 8000; apiGET /200 on 8000 (withNB_GRAPH_USERNAME/PASSWORDand a datasets metadata file, as before); query-toolGET /200 on 5173 (withNB_API_QUERY_URL)grep -rn materialize-context .github scripts justfilescripts/check-unchanged.shOKjust lintquery-tool-imagejob (builds through the composite action, serves 200)Documentation check: every build command in the touched README sections was run verbatim from the root of a fresh clone of this branch. The commands were
docker build -f tools/api/Dockerfile -t neurobagel/api:local .,docker build -f tools/api/Dockerfile -t neurobagel/api ., the federation-api and query-tool equivalents, andjust build api|federation-api|query-tool; all exit 0. api's Option 3docker run --env-file=.envneeds a user.envand graph, as before, and was not run.Deviations and findings
app/__pycache__/*.pycandapp/_version.py. api and federation-api have no.dockerignore, so local builds pick up whatever is inapp/. CI builds from a clean checkout and never has them. The listings were re-taken from a clean worktree, and the new allowlists exclude both, so local and CI images match. Plan updated.🤖 Generated with Claude Code