Using the DSE configuration volume
Docker images provided by DataStax include a startup script that swaps DataStax Enterprise (DSE) configuration files found in the /config
volume directory with the configuration file in the default location on the container.
Storing configuration files locally
A container can store configuration files locally. The configuration files used must match a corresponding configuration file in the image. It must also include all required values.
For example, configuration files that can be stored locally for DSE are cassandra.yaml
or dse.yaml
.
A configuration file for OpsCenter can be named opscenterd.conf
.
See the GitHub pages for a full list of configuration files.
-
-
Create a directory on your local host to store the configuration files.
-
Add the configuration files to replace in the container.
-
Mount the local directory to the exposed
/config
directory during startup.For example, if the file is located at
/dse/conf
, then the command will be:docker run -v /dse/conf:/config
-
The configuration files can be defined as part of a
docker run
command to start a container:docker run -e DS_LICENSE=accept --name my-dse -v /dse/config:/config \ -d cr.dtsx.io/datastax/dse-server:{dse-latest-version}
Setting the
DS_LICENSE
environment variable signals your acceptance of the DataStax terms of service and is required for the software to start. -
If you make changes or add config files to the
/config
volume, restart the container to propagate the changes to the database.docker restart container_name
Restarting the container restarts DSE.
-