Skip to content

Add Dockerfile and docs for building Cloudberry Docker Images#1607

Draft
tuhaihe wants to merge 2 commits intoapache:mainfrom
tuhaihe:devops-docker-image
Draft

Add Dockerfile and docs for building Cloudberry Docker Images#1607
tuhaihe wants to merge 2 commits intoapache:mainfrom
tuhaihe:devops-docker-image

Conversation

@tuhaihe
Copy link
Member

@tuhaihe tuhaihe commented Mar 10, 2026

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


@tuhaihe tuhaihe marked this pull request as draft March 10, 2026 10:04
@tuhaihe
Copy link
Member Author

tuhaihe commented Mar 10, 2026

Try:

docker build -f devops/build/packaging/docker/Dockerfile.rocky9 -t apache/cloudberry:2.1 .

docker run --rm -it \
  --name cloudberry-db \
  -p 5432:5432 \
  apache/cloudberry:2.1

@tuhaihe tuhaihe force-pushed the devops-docker-image branch from 4d2da58 to 0726d7d Compare March 11, 2026 02:36
@tuhaihe
Copy link
Member Author

tuhaihe commented Mar 11, 2026

Hi @leborchuk Could you take a look at this when you have time?

For the 2.1 release, I'm thinking it might be helpful if we provide a single-node Docker image for quick testing and evaluation other than DEB/RPM. In this PR, I added a Dockerfile to build a Cloudberry image based on Rocky Linux 9.

Would love to hear your thoughts on whether this approach makes sense, and if you have any suggestions for improvement.

Copy link
Contributor

@leborchuk leborchuk left a comment

Choose a reason for hiding this comment

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

Checked, looks great, I built container on my dev environment and could execute simple queries. That's enough for the simple test )

The only issue I see that my container build ~30 minutes, because of long repository copying and package installations. But the overall approach is good for unexperienced user - just execute commands 1 - by - 1.

I even think we could publish containers like these together with release binaries (in docker registry), so users could just use image with name like apache/incubator-cloudberry:cbdb-simple-rocky9-2.1 and skip a long build stage. But it's just an idea ))


## Build

Build from the current source tree (multi-stage build using a pre-built builder image):
Copy link
Contributor

Choose a reason for hiding this comment

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

cd root directory of cloned main repo, my first launch was from devops/build/packaging/docker/ directory and it of course does not work

@tuhaihe
Copy link
Member Author

tuhaihe commented Mar 11, 2026

I even think we could publish containers like these together with release binaries (in docker registry), so users could just use image with name like apache/incubator-cloudberry:cbdb-simple-rocky9-2.1 and skip a long build stage. But it's just an idea ))

Agree. There is no need for Users to build the image from scratch.

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