{"id":51631850,"url":"https://github.com/woblerr/docker-cloudberry","last_synced_at":"2026-07-13T08:05:00.452Z","repository":{"id":354034420,"uuid":"1187912443","full_name":"woblerr/docker-cloudberry","owner":"woblerr","description":"Apache Cloudberry inside Docker.","archived":false,"fork":false,"pushed_at":"2026-05-05T19:54:36.000Z","size":69,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-05T21:24:38.110Z","etag":null,"topics":["cloudberry","docker","greenplum","inside-docker","mpp","olap"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/woblerr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-21T11:05:22.000Z","updated_at":"2026-05-05T19:54:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/woblerr/docker-cloudberry","commit_stats":null,"previous_names":["woblerr/docker-cloudberry"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/woblerr/docker-cloudberry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woblerr%2Fdocker-cloudberry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woblerr%2Fdocker-cloudberry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woblerr%2Fdocker-cloudberry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woblerr%2Fdocker-cloudberry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/woblerr","download_url":"https://codeload.github.com/woblerr/docker-cloudberry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woblerr%2Fdocker-cloudberry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35414734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudberry","docker","greenplum","inside-docker","mpp","olap"],"created_at":"2026-07-13T08:04:59.614Z","updated_at":"2026-07-13T08:05:00.440Z","avatar_url":"https://github.com/woblerr.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-cloudberry\n\nThis project provides Docker images for running [Apache Cloudberry](https://cloudberry.apache.org/) in containers. It supports both single-node and multi-node deployments. The images can be used for development, testing, and learning purposes.\n\nFor Greenplum Database and its other forks (Greengage, WarehousePG, open-gpdb) Docker images, see the [docker-greenplum](https://github.com/woblerr/docker-greenplum) repository.\n\nThe Cloudberry in docker provides the following features:\n- single-node deployment;\n- coordinator and segments deployment;\n- support for segment mirroring;\n- standby coordinator support;\n- diskquota (not available in 2.1.0-incubating, will be added in a future release);\n- gpbackup/gprestore;\n- gpbackup-s3-plugin;\n- gpbackman;\n- PXF (Platform Extension Framework);\n- custom initialization scripts;\n- WAL-G (physical backups).\n\n\nEnvironment variables supported by this image:\n\n* `TZ` - container's time zone, default `Etc/UTC`;\n* `CLOUDBERRY_USER` - non-root user name for execution of the command, default `gpadmin`;\n* `CLOUDBERRY_UID` - UID of `${CLOUDBERRY_USER}` user, default `1001`;\n* `CLOUDBERRY_GROUP` - group name of `${CLOUDBERRY_USER}` user, default `gpadmin`;\n* `CLOUDBERRY_GID` - GID of `${CLOUDBERRY_USER}` user, default `1001`;\n* `CLOUDBERRY_DEPLOYMENT` - Cloudberry deployment type, default `singlenode`, available values: `singlenode`, `master`, `segment`, `standby`;\n* `CLOUDBERRY_DATA_DIRECTORY` - Cloudberry data directory location, default `/data`;\n* `CLOUDBERRY_SEG_PREFIX` - Cloudberry segment prefix, default `gpseg`;\n* `CLOUDBERRY_DATABASE_NAME` - Cloudberry database name, default `demo`, this database will be created during the initialization;\n* `CLOUDBERRY_DISKQUOTA_ENABLE` - enable diskquota, default `false`. Note: diskquota extension is not available in 2.1.0-incubating, the setting will be silently skipped;\n* `CLOUDBERRY_PXF_ENABLE` - enable PXF, default `false`;\n* `CLOUDBERRY_WALG_ENABLE` - enable WAL-G, default `false`;\n* `CLOUDBERRY_STANDBY_HOSTNAME` - standby coordinator hostname, used when `CLOUDBERRY_DEPLOYMENT=master` to add standby's SSH host key to `known_hosts` and initialize standby coordinator via `gpinitstandby`, optional;\n* `CLOUDBERRY_COORDINATOR_HOSTNAME` - coordinator hostname, used when `CLOUDBERRY_DEPLOYMENT=standby` to add coordinator's SSH host key to `known_hosts`; required when `CLOUDBERRY_DEPLOYMENT=standby`;\n\nRequired environment variables:\n* `CLOUDBERRY_PASSWORD` - password for `${CLOUDBERRY_USER}` user, **required**;\n\n## Build matrix\n\nThe repository contains information for the last available versions. For specific version, you can build your own image using the [Build](#build) section.\n\n| Image | CBDB Version | Ubuntu 22.04 | Rocky Linux 9 | Platform |\n|---|---|---|---|---|\n| cloudberry | 2.1.0-incubating | `2.1.0-incubating`, `2.1.0-incubating-ubuntu22.04` | `2.1.0-incubating-rockylinux9` | `linux/amd64`, `linux/arm64` |\n\n## Pull\n\nChange `tag` to the version you need.\n\n* Docker Hub:\n\n```bash\ndocker pull woblerr/cloudberry:tag\n```\n\n* GitHub Registry:\n\n```bash\ndocker pull ghcr.io/woblerr/cloudberry:tag\n```\n\n## Run\n\nYou will need to mount the necessary directories or files inside the container (or use this image to build your own on top of it).\n\n### Simple\n\n```bash\ndocker run -p 5432:5432 -e CLOUDBERRY_PASSWORD=gparray -d cloudberry:2.1.0-incubating\n```\n\nConnect to Cloudberry:\n\n```bash\npsql -h localhost -p 5432 -U gpadmin demo\n```\n\n### Docker Secrets\n\nAs an alternative to passing sensitive information via environment variables, `_FILE` may be appended to `CLOUDBERRY_PASSWORD` environment variable. In particular, this can be used to load passwords from Docker secrets stored in `/run/secrets/\u003csecret_name\u003e` files.\n\nFor example:\n```bash\ndocker run -p 5432:5432 -e CLOUDBERRY_PASSWORD_FILE=/run/secrets/gpdb_password -d cloudberry:2.1.0-incubating\n```\n\n### Initialization Scripts\n\nThe image supports running custom initialization `*.sql` or `*.sh` scripts after Cloudberry was started. Place your scripts in the `/docker-entrypoint-initdb.d` directory inside the container.\n\nScripts in `/docker-entrypoint-initdb.d` are executed only if a container is started with an empty data directory; any pre-existing database will remain untouched when the container is started.\n\n#### Script Execution Process\n\nScripts are processed as follows:\n- **SQL scripts** (`*.sql`): Executed using `psql` with the following options:\n  - Executed for the database specified in `CLOUDBERRY_DATABASE_NAME`.\n  - Run with `-v ON_ERROR_STOP=1` flag.\n  - Run with `--no-psqlrc`.\n  - Connected as the `CLOUDBERRY_USER`.\n- **Shell scripts** (`*.sh`):\n  - If the script has executable permissions, it is executed directly.\n  - If not executable, it is sourced.\n- **Other files**: Files with other extensions are ignored.\n\nExample SQL initialization script `00_init.sql`:\n\n```sql\nCREATE TABLE test_initialization (\n  id serial PRIMARY KEY,\n  name text,\n  created_at timestamp DEFAULT current_timestamp\n);\n\nINSERT INTO test_initialization (name) VALUES ('Initialized via sql script');\n```\nExample shell script `01_init.sh`:\n\n```bash\n#!/bin/bash\necho \"Executing initialization shell script\"\npsql -U ${CLOUDBERRY_USER} -h $(hostname) -d ${CLOUDBERRY_DATABASE_NAME} -c \"INSERT INTO test_initialization (name) VALUES ('Added via shell script');\"\necho \"Shell script executed successfully!\"\n```\n\nYou can mount your initialization scripts directory to the container:\n\n```bash\ndocker run -p 5432:5432 \\\n  -e CLOUDBERRY_PASSWORD=gparray \\\n  -v $(pwd)/docs/custom_init_scripts:/docker-entrypoint-initdb.d \\\n  -d cloudberry:2.1.0-incubating\n```\n\nOr build a custom image:\n\n```bash\nFROM cloudberry:2.1.0-incubating\nCOPY docs/custom_init_scripts/* /docker-entrypoint-initdb.d/\n```\n\n#### WAL-G configuration\n\nWhen `CLOUDBERRY_WALG_ENABLE=true`, WAL-G is installed and available, but you need to configure it manually or use initialization scripts to set up `archive_command` and other parameters.\n\n\n```bash\ndocker run -p 5432:5432 \\\n  -e CLOUDBERRY_PASSWORD=gparray \\\n  -e CLOUDBERRY_WALG_ENABLE=true \\\n  -v $(pwd)/wal-g.yaml:/tmp/wal-g.yaml \\\n  -v $(pwd)/wal-g_init.sh:/docker-entrypoint-initdb.d/wal-g_init.sh \\\n  -d cloudberry:2.1.0-incubating\n```\n\nWhere init scripts for WAL-G looks like:\n```bash\n#!/bin/bash\necho \"Configuring wal-g archive_command\"\nUSER=${CLOUDBERRY_USER} gpconfig -c archive_command -v \"wal-g seg wal-push %p --content-id=%c --config /tmp/wal-g.yaml\"\nUSER=${CLOUDBERRY_USER} gpconfig -c archive_timeout -v 600 --skipvalidation\nUSER=${CLOUDBERRY_USER} gpstop -u\n```\n\n### Docker Compose\n#### Prepare\n\nPrepare password file (**set your own password**):\n```bash\necho \"gparray\" \u003e docker-compose/secrets/gpdb_password\n```\n\nFor correct start docker compose, configs should be mounted to `/tmp`.\nIt's valid for `gpinitsystem_config`, `hostfile_gpinitsystem` and `authorized_keys` files.\n\nSSH rsa keys should be mounted to `/home/${CLOUDBERRY_USER}/.ssh/` directory.\nCoordinator mounts:\n```yaml\n    volumes:\n      - ./conf/gpinitsystem_config_no_mirrors:/tmp/gpinitsystem_config\n      - ./conf/hostfile_gpinitsystem:/tmp/hostfile_gpinitsystem\n      - ./conf/ssh/id_rsa:/home/gpadmin/.ssh/id_rsa\n      - ./conf/ssh/id_rsa.pub:/home/gpadmin/.ssh/id_rsa.pub\n```\nSegments mounts:\n```yaml\n    volumes:\n       - ./conf/ssh/authorized_keys:/tmp/authorized_keys\n```\n\n#### Standby Coordinator\n\nStandby coordinator mounts:\n```yaml\n    environment:\n      - CLOUDBERRY_DEPLOYMENT=standby\n      - CLOUDBERRY_COORDINATOR_HOSTNAME=master\n    volumes:\n      - ./conf/ssh/authorized_keys:/tmp/authorized_keys\n      - ./conf/hostfile_gpinitsystem:/tmp/hostfile_gpinitsystem\n      - ./conf/ssh/id_rsa:/home/gpadmin/.ssh/id_rsa\n      - ./conf/ssh/id_rsa.pub:/home/gpadmin/.ssh/id_rsa.pub\n```\n\n`CLOUDBERRY_COORDINATOR_HOSTNAME` is required to add coordinator's SSH host key to `known_hosts` on standby. `hostfile_gpinitsystem` and SSH keys are required for standby to connect to segments after failover via `gpactivatestandby`.\n\nThe standby coordinator initialization is triggered only during the initial cluster setup. If the standby data volume is recreated later while the active coordinator data persists, it will not be initialized automatically. Manual restoration via `gpinitstandby` is required.\n\n#### Run\nRun cluster with 1 coordinator and 2 segments without mirroring:\n```bash\ndocker compose -f ./docker-compose/docker-compose.no_mirrors.yaml up -d\n```\n\nRun cluster with persistent storage:\n```bash\ndocker compose -f ./docker-compose/docker-compose.no_mirrors_persistent.yaml up -d\n```\n\nRun cluster with 1 coordinator and 2 segments with mirroring:\n```bash\ndocker compose -f ./docker-compose/docker-compose.with_mirrors.yaml up -d\n```\n\nRun cluster with 1 coordinator, standby coordinator and 2 segments with mirroring:\n```bash\ndocker compose -f ./docker-compose/docker-compose.with_mirrors_and_standby.yaml up -d\n```\n\n## Build\n\nFor Ubuntu based images:\n```bash\nmake build_cbdb_ubuntu TAG_CBDB=2.1.0-incubating\n```\n\nFor Rocky Linux based images:\n```bash\nmake build_cbdb_rockylinux TAG_CBDB=2.1.0-incubating\n```\n\n**Manual build examples:**\n\nUbuntu simple manual build:\n```bash\ndocker buildx build -f docker/cloudberry/ubuntu22.04/Dockerfile -t cloudberry:2.1.0-incubating .\n```\n\nRocky Linux simple manual build:\n```bash\ndocker buildx build -f docker/cloudberry/rockylinux9/Dockerfile -t cloudberry:2.1.0-incubating-rockylinux9 .\n```\n\nManual build with specific component version for `linux/amd64` platform:\n```bash\ndocker buildx build --platform linux/amd64 -f docker/cloudberry/ubuntu22.04/Dockerfile --build-arg CBDB_VERSION=2.1.0-incubating -t cloudberry:2.1.0-incubating .\n```\n\nManual build with specific component versions for `linux/amd64` and `linux/arm64` platforms:\n```bash\ndocker buildx build --platform linux/amd64,linux/arm64 -f docker/cloudberry/ubuntu22.04/Dockerfile --build-arg CBDB_VERSION=2.1.0-incubating -t cloudberry:2.1.0-incubating .\n```\n\n## Running tests\nRun the end-to-end tests:\n```bash\nmake test-e2e\n```\nSee [tests description](./e2e-tests/README.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoblerr%2Fdocker-cloudberry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoblerr%2Fdocker-cloudberry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoblerr%2Fdocker-cloudberry/lists"}