Skip to content

CBD-6817, docker script and template for rosetta-mdb. - #250

Open
mhocouchbase wants to merge 1 commit into
couchbase:masterfrom
mhocouchbase:master
Open

CBD-6817, docker script and template for rosetta-mdb.#250
mhocouchbase wants to merge 1 commit into
couchbase:masterfrom
mhocouchbase:master

Conversation

@mhocouchbase

Copy link
Copy Markdown
Contributor

docker script and template for rosetta-mdb.

-Ming

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 ProductMongoDBCompatibility to the generator and enables arm64 generation for it.
  • Adds a Dockerfile template to download/install the cbmcd binary and run it as the couchbase user.
  • 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,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants