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.
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
.
For a full list of configuration files, see the DSE configuration templates, OpsCenter configuration templates,and Studio configuration templates.
-
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, the following command uses a file located at
/dse/conf
:docker run -v /dse/conf:/config
You can set configuration files in your
docker run
command when starting a container:docker run -e DS_LICENSE=accept --name my-dse -v /dse/config:/config \ -d cr.dtsx.io/datastax/dse-server:DSE_VERSION
-
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.