[Feature]: Publish official Docker images (GHCR) on release
Problem or use case
roam-code already ships a well-structured Dockerfile (´python:3.12-slim-bookworm´, non-root user, OCI labels, healthcheck) and documents a local docker build path in the README. There is no official pre-built image on GHCR or Docker Hub, so every user who prefers containers must clone the repo and build from source.
This adds friction for:
- users who prefer docker run over pip/pipx/uv (my deployment case)
- CI/CD pipelines that want a stable, versioned image without building on every job
- environments where installing Python tooling is restricted or undesirable
An unofficial image exists (letiemble/roam-code), but it is not maintained by the project and can drift from releases.
Proposed solution
- Add a GitHub Actions workflow that builds and pushes the existing
Dockerfileto GitHub Container Registry on every tagged release (e.g.v*). Suggested tags:
ghcr.io/cranot/roam-code:latestghcr.io/cranot/roam-code:<semver>(e.g.14.0.0)- optionally
ghcr.io/cranot/roam-code:<major>and<major>.<minor>
- Workflow outline:
- Trigger on release / tag
v* - Login to ghcr.io with
${{ secrets.GITHUB_TOKEN }} - Build with
docker/build-push-action(multi-platformlinux/amd64,linux/arm64if feasible) - Push the tags above
- Optionally attach SBOM / provenance attestations
- Update the README “Alternate install methods + Docker” section with pull/run examples, e.g.:
docker pull ghcr.io/cranot/roam-code:latest
docker run --rm -v "$PWD:/workspace" ghcr.io/cranot/roam-code index
docker run --rm -v "$PWD:/workspace" ghcr.io/cranot/roam-code health
-
Keep the existing local-build instructions as a fallback.
-
(Optional) Enable package visibility = public and link the package to the repository so it appears under the repo’s Packages tab.
I am happy to open a follow-up PR with the workflow + README changes if this direction is acceptable.
Alternatives considered
- Local build only (status quo) — works, but forces every consumer to rebuild.
- Docker Hub instead of / in addition to GHCR — possible; GHCR is the lowest-friction option because authentication and permissions are already available via
GITHUB_TOKEN. - Rely on the existing unofficial image — not ideal, image is pretty old.
- Publish only on major releases — possible compromise, but tagging every release keeps the image in sync with PyPI.
Category
CI/CD Integration
Additional context
Happy to adjust scope (single-arch first, documentation-only first, etc.) based on maintainer preference.
Thanks for the thoughtful proposal — especially the point about avoiding custom builds in every team's workflow.
I'm implementing this now, starting with linux/amd64. The release path will publish to ghcr.io/cranot/roam-code only after the matching package release passes its checks, with version tags and latest. It also checks the image's source revision, includes build evidence, and tests an anonymous pull before announcing it as public.
The image now includes MCP dependencies, uses the repository's dependency lock, and has passed a real first-index test with networking disabled. I've added examples for mount permissions and kept the local-build instructions too.
The full release checks are still running, so there isn't a public image to point you to yet. I'll follow up with the usable tag and digest once publication is verified. Appreciate the offer to help — amd64 first gives us a sensible, testable starting point.
Quick update: the container build and offline checks are working, but I'm holding the first public image while I review the remaining operating-system security findings. The Python dependencies passed their audit; that doesn't cover everything inherited from the base image.
The upcoming package and website updates can go ahead separately. I'm adding an explicit publication switch so a package release won't accidentally publish the image while this review is open. The local-build path remains available.
I'll keep this issue open and post a usable tag and digest only after public publication has actually been verified. Thanks again for raising this — the extra checks have been worthwhile.
Great, thank you for the heads-up!
I saw that you also added --gid=1000 and --uid=1000 to the following line in the Dockerfile (in 5c56ff472ebbd3351ce5ae416a6c9caf01d58d74):
RUN groupadd --gid 1000 roam && useradd --uid 1000 --gid roam -m -d /home/roam roam \
Until now I was building a tiny derived image using the following lines to change the uid/gid for the roam:roam user that was 999/999 before your change. My deployment user is mcp/mcp:
docker build -t roam-code \
--build-arg MCP_UID=$(id -u mcp) \
--build-arg MCP_GID=$(id -g mcp) \
- <<'EOF'
ARG BASE=roam-code
FROM ${BASE}
ARG MCP_UID
ARG MCP_GID
USER root
RUN groupmod -g "${MCP_GID}" roam \
&& usermod -u "${MCP_UID}" -g "${MCP_GID}" roam \
&& chown -R roam:roam /home/roam \
&& pip install 'roam-code[mcp]'
USER roam
EOF
I am leaving this here for the future readers that may need to use uid/gid different from 1000/1000 after your change. Notes:
- The quoted
<<'EOF'prevents shell expansion inside the heredoc —${MCP_UID}/${MCP_GID}are expanded by Docker from the--build-argflags, not by your shell. - Once official images exist, the same heredoc works unchanged; just point
BASEat the official image, e.g. add--build-arg BASE=ghcr.io/cranot/roam-code:latest. - Assumes the target UID/GID is free inside the base image.
Thanks for sharing the UID/GID workaround and explaining your setup. Official image publishing is still on hold, so I don't have a verified release image to point you to yet.
What do you mainly use Roam for once it's running, and is that part of your own workflow or a shared team setup? A recent example would help me understand what matters beyond installation. No private code needed.
Thank you for the heads up!
My context: the team is working on separate, isolated projects. A project is made of one or multiple repositories. Tech/languages are varied across and within projects: Java, C, C++, Python, JS...
My plan is to setup a per-project centralized (streamable-http) roam-code MCP . For each project, the code of belonging repositories is cloned and a cron job fetches and updates indexes on a regular basis. Maybe that can be triggered by pushes in the future. Layout on disk:
/var/lib/mcp/roam-code/
project1/
repoA/
repoB/
project2/
repoA/
repoC/
project3/
repoD/
repoE/
I fire one roam-code image per project. The goal is that team members just point to the project-specific MCP to get the benefits instead of having to set up and administer roam-code by themselves. I am also planning to use my bifrost instance for routing requests.
Some projects are not frontend / backend with web API invocation but a bunch of dependent libraries (Java, C, ...). Currently, roam-code has a number of limitations here for my use case. You're probably aware of them. They are unrelated to this issue, but I am listing them so you can see the big picture:
frontend/backend tagging is limited
The current role tagging approach does not work in cases where the calling structure is repoA -> repoB -> repoC. What I am doing is setting connections by hand (not a big deal):
"name": "project1",
"repos": [
{ "path": "repoA", "name": "repoA", "role": "frontend" },
{ "path": "repoB", "name": "repoB", "role": "backend" },
{ "path": "repoC", "name": "repoC", "role": "backend" }
],
"connections": [
{ "type": "rest-api", "frontend": "repoA", "backend": "repoB"},
{ "type": "rest-api", "frontend": "repoB", "backend": "repoC"}
]
Only rest-API calls are detected as cross-repo adges
VERDICT: 0 frontend calls discovered; nothing to resolve
Cross-repo edges: 0 api_call edges stored
Cross-repo (as in cross-library) calls are not detected. I guess those should be java-api or c-api connection types.
At first, the cross-repo connections was the thing that drove me to try roam-code. I am not sure if what I am trying to do aligns with your vision. If yes, I can help with your guidance.
Thanks, this makes the use case much clearer. Following dependencies across related repositories fits what I want Roam to help with, and the shared per-project setup is useful context.
I checked ws resolve. The current workspace resolver matches HTTP calls to backend routes; it doesn't resolve Java or C library calls across separately indexed repositories. Setting a connection to rest-api won't make it follow those library calls. The zero-edge result here doesn't mean the repositories are independent.
I also checked java-api and c-api: those aren't implemented connection types, and the command currently skips them without making that clear. That's something the output needs to distinguish.
Could you share a small public or synthetic example with one call from repoA into repoB, in whichever language matters most to your team? The Roam version and how repoB is consumed, as a source checkout or a built library, would help too. No private code needed. That would give us a concrete case to work through, and I'd appreciate your help with it.
Sorry for the late reply, black October has taken its toll.
rest-api is about:
- on the client: finding the HTTP calls and figuring out which endpoint your calling. Might be tricky depending on how the URLs are built.
- on the backend, find the exposed endpoints (annotations, OpenAPI specs, ... depending on the framework/language)
For traditional programing, cross-repo calls are similar in a wide range of languages, including JS/TS. In general you have module management that lists/downloads/updates dependencies (npm for JS, maven for Java, pip for Python, cargo for Rust...). Sometimes it is more buried in the build system (CMake's FetchContent, Bazel's bazel_dep, ...). On top of that, in the code, you have some import/include mechanism that declares what you code source needs to compile/execute.
I'll use the example of roam-code itself. Imagine you forked networkx for whatever reason. Both roam-code and networkx are cloned on your disk.
We're aiming at multi-project cross-referencing. Most IDEs have it. I am far from fluent in language parsing and the libraries you're using might simplify everything, but he difficulties, as I see them, are:
1. In caller source code, which imports/include belong to what module/repo.
You have "networkx>=3.0" in your dependencies. Your code does import networkx as nx or from networkx import NetworkXException. It is relatively easy to map those imports to the networkx dependency.
However, some pypi projects for not map nicely to their imports. For scikit-learn you import sklearn, for beautifulsoup4 you import bs4, just to cite a few. In most languages you cannot directly map include/import clauses to dependency name.
Then you have to map the dependency name to the cloned folder on disk.
2. In caller source code, what are the actual code calls to other modules/repos.
A typical call to networkx is
https://github.com/Cranot/roam-code/blob/88a19184a56beb1a66ad9cf0d22b4c8ab73a7b4c/src/roam/commands/cmd_cut.py#L302
In Python, functions calls are easy to track from the imports. In C/C++ that`s less trivial.
In OOP (Python or Java/C++) as soon as you start passing class instances around, it becomes much more difficult, in particular with inheritance (where apparent object type is not the actual object type). In the following snippet: what are G, UG?
https://github.com/Cranot/roam-code/blob/88a19184a56beb1a66ad9cf0d22b4c8ab73a7b4c/src/roam/commands/cmd_cut.py#L228
3. in provider source code, which functions/methods are externally visible and actually exported/callable.
Here mechanisms differ vastly from language to language and from platform to platform (on Windows you need to export DLL symbols explicitely, on Linux they are exported by default).