Building custom Docker images
Use DataStax source code to customize a Docker image for your environment.
Use DataStax source code to build a custom Docker image for your environment.
- Clone the DataStax Docker Github repository.
- Make any desired configuration changes.
- Run the
./gradlew
command.
Use DataStax source code to build a custom Docker image for your environment.
- Clone the DataStax Docker Github repository.
- Make any desired configuration changes.
- Run the
./gradlew
command.
DataStax provides a code repository on Github for building custom Docker images.
By default, Gradle downloads the DataStax tarballs from the DataStax Downloads page.
./gradlew buildImages
./gradlew tasks
Multiple product versions
To support
multiple product versions without duplicating files, Docker build contexts are generated
from source folders that contain FreeMarker templates (files with
.ftl
extensions). The following conventions are used:
- Docker build contexts are generated from self-describing product folders. For example,
server
,opscenter
, andstudio
. - All files without the
.ftl
extension are copied to the build context. - Files with
.ftl
extensions are processed as FreeMarker templates:- Template directives are written using angle bracket syntax.
- Square bracket syntax is used for interpolations.
- The processed files are copied to the build context without
.ftl
extension. For example,Dockerfile.ftl
is copied asDockerfile
.
- FreeMarker templates use the
version
variable:version.major
returns product version major numberversion.minor
returns product version minor numberversion.bugfix
returns product version bugfix number- The following version functions are available:
version.lowerThan('x.y.z')
returnstrue
ifversion
is semantically lower thanx.y.z
version.greaterEqualThan('x.y.z')
returnstrue
ifversion
is semantically greater than or equal tox.y.z
.