Build with Docker Dev Image
This guide provides instructions for building Apache Cloudberry using a Docker-based development environment. This method is particularly useful for ensuring a consistent build environment across different systems and for saving setup time.
Prerequisites
- Docker: Ensure you have Docker installed on your system. You can download and install Docker from the official website: Docker.
- Harddisk space: Ensure you have at least 10 GB of free disk space available for the Docker image and build artifacts.
Run the Docker Dev Image
Run the following command to start a Docker container with the Apache Cloudberry development image:
- Rocky Linux 8
- Rocky Linux 9
- Ubuntu 22.04
docker run --name cbdb-dev -it --rm -h cdw --shm-size=2gb apache/incubator-cloudberry:cbdb-build-rocky8-latest
docker run --name cbdb-dev -it --rm -h cdw --shm-size=2gb apache/incubator-cloudberry:cbdb-build-rocky9-latest
The official Docker development image for Apache Cloudberry is still in development. Coming soon.
Explaination:
--name=cbdb-dev
will set the name of the container tocbdb-dev
. You can change it to any name you prefer.-it
will run the container in interactive mode, allowing you to execute commands inside it.--rm
will remove the container after you exit it. If you want to keep the container for further use, you can remove this option.-h cdw
will set the hostname of the container tocdw
(Coordinator Data Warehouse).--shm-size=2gb
is used to set the container's shared memory for test suites run successfully. Test failures can occur when the Cloudberry cluster lacks sufficient shared memory resources, then you may need to increase the container's shared memory using this option.
This development environment has done the following things for you:
- Created a user named
gpadmin
with the necessary permissions. - Set up the environment variables and paths.
- Configured the specific system resource limits.
- Installed the necessary dependencies.
Then you will be inside the Docker container with the Apache Cloudberry development environment ready to use. Before you go on, you need to make sure you have login the docker container as the gpadmin
user like this:
======================================================================
++++++++++ ++++++
++++++++++++++ +++++++
++++ +++++ ++++
++++ +++++++++
=+==== =============+
======== =====+ =====
==== ==== ==== ====
==== === === ====
==== === === ====
==== === ==-- ===
===== ===== -- ====
===================== ======
============================
=-----=
____ _ _ _
/ ___|| | ___ _ _ __| || |__ ___ _ __ _ __ _ _
| | | | / _ \ | | | | / _` || '_ \ / _ \| '__|| '__|| | | |
| |___ | || (_) || |_| || (_| || |_) || __/| | | | | |_| |
\____||_| \____ \__,_| \__,_||_.__/ \___||_| |_| \__, |
|___/
----------------------------------------------------------------------
Welcome to the Apache Cloudberry Build Environment!
Container OS ........ : Rocky Linux 9.5 (Blue Onyx)
User ................ : gpadmin
Container hostname .. : cdw
IP Address .......... : 170.17.0.1
CPU Info ............ : Intel(R) Xeon(R) Gold 6151 CPU @ 3.00GHz
CPU(s) .............. : 8
Memory .............. : 15Gi total
======================================================================
[gpadmin@cdw ~]$
What's next?
- Download the source code
- Configure Apache Cloudberry Build
- Build and Install Apache Cloudberry and contrib extensions
- Set up a Cloudberry Demo Cluster (start with the step
Set up Cloudberry environment variables
) - Post installation