CBD-6817, docker script and template for rosetta-mdb. - #250
Open
mhocouchbase wants to merge 1 commit into
Open
Conversation
mhocouchbase
requested review from
ANANTH-SWAMY,
brett19 and
yash-dodderi7
and
a lite review from Copilot
September 4, 2026 23:35
There was a problem hiding this comment.
🟡 Changes recommended
The new Dockerfile template does not currently handle multi-arch @@ARCH@@ substitution and the release URL handling needs to be parameterized to preserve staging/URL behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds support in the Dockerfile generator for a new product image, couchbase-mongodb-compatibility (rosetta-mdb / cbmcd), including a new Dockerfile template and README resources so the image can be generated like the other Couchbase products.
Changes:
- Introduces
ProductMongoDBCompatibilityto the generator and enables arm64 generation for it. - Adds a Dockerfile template to download/install the
cbmcdbinary and run it as thecouchbaseuser. - Adds a minimal README resource for the generated image directory.
File summaries
| File | Description |
|---|---|
| generate/templates/couchbase-mongodb-compatibility/Dockerfile.template | New Dockerfile template for installing/running cbmcd (rosetta-mdb). |
| generate/resources/couchbase-mongodb-compatibility/README.md | New README resource for the generated image output. |
| generate/generator/generate.go | Registers the new product and wires generator params/arches/base image for it. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+28
to
+35
| ARG CB_VERSION={{ .CB_VERSION }} | ||
| ARG CB_RELEASE_URL=https://packages.couchbase.com/releases/rosetta-mdb/${CB_VERSION} | ||
| ARG CB_PACKAGE={{ .CB_PACKAGE }} | ||
| RUN set -x \ | ||
| && CB_BINARY="$(echo "${CB_PACKAGE}" | cut -d'-' -f1)" \ | ||
| && curl --fail -o "/usr/local/bin/${CB_BINARY}" \ | ||
| "${CB_RELEASE_URL}/${CB_PACKAGE}" \ | ||
| && chmod +x "/usr/local/bin/${CB_BINARY}" |
Comment on lines
+384
to
+389
| params = map[string]any{ | ||
| "CB_VERSION": variant.VersionWithSubstitutions(), | ||
| "CB_PACKAGE": variant.mongoCompatibilityPackageFile(Archgeneric), | ||
| "DOCKER_BASE_IMAGE": variant.dockerBaseImage(), | ||
| "CB_MULTIARCH": len(variant.Arches) > 1, | ||
| } |
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.
docker script and template for rosetta-mdb.
-Ming