Skip to content

contrib/docker: publish the Docker image to ghcr.io - #6180

Open
SChakravorti21 wants to merge 4 commits into
bloomberg:mainfrom
SChakravorti21:ghcr
Open

SChakravorti21 wants to merge 4 commits into
bloomberg:mainfrom
SChakravorti21:ghcr

Conversation

@SChakravorti21

@SChakravorti21 SChakravorti21 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Three changes:

  1. f0df082: make it so that the tests that exercise standalone dbs can run with a pre-built image (making the clustered tests work with a pre-built image will require more thought).
  2. 6306089: add a sanity check to the image's entrypoint - user must specify a dbname for the database to start.
  3. c54421b: add a GitHub Actions workflow for publishing the image to the GitHub container registry (ghcr). This does the following:
    a. Build the image for both amd64 and arm64.
    b. "Merge" the manifests so that a docker pull can choose the best image for the native architecture, and publish to ghcr.
    c. Verify that the published images pass tests/contrib_docker.

Tested the publish workflow from my fork:

schakravorti@G0071XFCV7 comdb2 % docker run -d --name comdb2 ghcr.io/schakravorti21/comdb2:latest mydb
84585048748d722437d938a59a090a5af4659a91a6d8197885dc5b5aba839e30
schakravorti@G0071XFCV7 comdb2 % docker exec comdb2 cdb2sql mydb local "create table t(i int)"
schakravorti@G0071XFCV7 comdb2 % docker exec comdb2 cdb2sql mydb local "insert into t values(42)"
(rows inserted=1)
schakravorti@G0071XFCV7 comdb2 % docker exec comdb2 cdb2sql mydb local "select * from t"
(i=42)

Adds a section argument and COMDB2_DOCKER_IMAGE so the standalone checks can run
against a prebuilt image, as the publish workflow needs.

Signed-off-by: Shoumyo Chakravorti <schakravorti@bloomberg.net>
The standalone entrypoint served the databases named as arguments but exited
silently when given none. Print usage and exit non-zero instead, and cover it in
the smoke test.

Signed-off-by: Shoumyo Chakravorti <schakravorti@bloomberg.net>
Adds a workflow that builds Dockerfile.dev for amd64 and arm64 and pushes a
combined manifest to the GitHub Container Registry on pushes to main.

Signed-off-by: Shoumyo Chakravorti <schakravorti@bloomberg.net>

@roborivers roborivers 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.

Cbuild submission: Error ⚠.
Regression testing: Success ✓.

The first 10 failing tests are:
sc_resume_logicalsc_generated **quarantined**
ssl_san
consumer_non_atomic_default_consumer_generated **quarantined**
ssl_set_cmd
ssl_prefer
ssl_dbname
sc_downgrade [timeout] **quarantined**
reco-ddlk-sql [timeout] **quarantined**

@SChakravorti21
SChakravorti21 marked this pull request as ready for review September 16, 2026 17:21
@SChakravorti21
SChakravorti21 force-pushed the ghcr branch 2 times, most recently from 49dc6e5 to 1ea2244 Compare September 22, 2026 16:38
Per-architecture images were uploaded before their smoke tests, possibly
allowing broken content to reach GHCR.

Verification: actionlint all workflows; verified crane archives and
digest-only local-registry publication.

Signed-off-by: Shoumyo Chakravorti <schakravorti@bloomberg.net>

@roborivers roborivers 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.

Cbuild submission: Error ⚠.
Regression testing: Success ✓.

The first 10 failing tests are:
analyze_partial_index_off_generated [failed with core dumped] **quarantined**
analyze [failed with core dumped] **quarantined**
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
skipscan [timeout] **quarantined**

This branch has not been deployed

No deployments
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