For those OSes that support Docker, we run builds inside of Docker containers. These containers are built using the
build.sh command at the root level.
apache organization to upload images. Ask the CouchDB PMC for assistance with this.
docker login -u $username and enter your password. (If using
podman specify the registry
docker login -u $username docker.io)
The platform images include all of the build dependencies necessary to build and full test CouchDB on a given OS/version/architecture combination.
Build a platform image with:
./build.sh platform <distro>-<version>
We want to generate a
rebar binary compatible with all versions of Erlang we support. If we do this on too new a version, older Erlangs won't recognize it. So we always keep an image around with that version.
On the other hand, some OSes won't run older Erlangs because of library changes, so you need to override that environment variable.
Just specify on the command line any of the
ELIXIRVERSION environment variables:
NODEVERSION=18 ELIXIRVERSION=v1.15.7 ERLANGVERSION=188.8.131.52 ./build.sh platform debian-bullseye
Use Docker‘s Buildx plugin to generate multi-architecture container images with a single command invocation. Docker Desktop ships with buildx support, but you’ll need to create a new builder to use it:
docker buildx create --name apache-couchdb --use
build.sh script has
buildx-platform targets that will will build and upload a new multi-arch container image to the registry. For example:
./build.sh buildx-platform debian-bullseye
$BUILDX_PLATFORMS environment variable can be used to override the default set of target platforms that will be supplied to the buildx builder.
ERLANGVERSION=184.108.40.206 ./build.sh buildx-platform-release
This will build all the Debian and RHEL-clone OS images on x86-64 with that version of Erlang
ERLANGVERSION=220.127.116.11 ./build.sh buildx-platform debian-bullseye
This will update Debian Bullseye OS image for all architectures (x86, ppc64le, arm64) with that version of Erlang. Do this for the images which are used with non-x86 architectures.
If the same image is used for release package building and CI, run this command after
buildx-platform-release to ensure that the debian-bullseye will be a rebuilt as a multi-arch image. Otherwise, buildx-platform-release creates as x86 only.
BUILDX_PLATFORMS=linux/amd64 ERLANGVERSION=25.2 ./build.sh buildx-platform debian-bullseye
In this case, since we're not using 25.2 for multi-arch testing, opt to build it only for x86.
./build.sh <command> [OPTIONS] Recognized commands: clean <plat> Removes all images for <plat>. clean-all Removes all images for all platforms. *buildx-platform <plat> Builds a multi-architecture image with Erlang & JS support. *buildx-platform-release <plat> Builds x86-64 images with default Erlang for all supported release OSes couch <plat> Builds and tests CouchDB for <plat>. couch-all Builds and tests CouchDB on all platforms. Commands marked with * require appropriate Docker Hub credentials.
After building the image as above:
docker run -it couchdbdev/<tag>
<tag> is of the format
<distro>-<version>-<type>, such as
./build.sh couch <distro>-<version>
This is only needed if a platform does not have a supported SpiderMonkey library. As of April 2021, this is no currently supported platform.
First, build the ‘base’ image with:
./build.sh base <distro>-<version>
After building the base image as above, head over to the apache/couchdb-pkg repository and follow the instructions there.
bin/ directory to install the dependencies correctly on your new OS/version/platform. Push a PR with these changes.
dockerfiles directory for your new OS.
./build.sh base <distro>-<version>. Solve any problems with the build process here.
./build.sh platform <distro>-<version>. Solve any problems with the build process here.
Jenkinsfile. Ask if you need help.
We are eager for contributions to enhance the build scripts to support setting up machines with the necessary build environment for:
as well as alternative architectures for the already supported image types (armhf, ppc64le, s390x, sparc, etc).
We know that Docker won't support some of these, but we should be able to at least expand the install scripts for all of these platforms.