Using the DSE configuration volume
Use volumes to persist data and configuration files for Docker containers.
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.
Procedure
- Create a directory on your local host to store the configuration files.
-
Add the configuration files to replace in the container. The file name must
match a corresponding configuration file in the image and include all required
values. For example
cassandra.yaml
,dse.yaml
,opscenterd.conf
. -
Mount the local directory to the exposed
/config
directory during startup.For example:docker run -v /dse/conf:/config
-
Start the container.
For example, to start a transactional node:
docker run -e DS_LICENSE=accept \ --name my-dse \ -v /dse/config:/config datastax/dse-server \ -d datastax/dse-server
Setting the
DS_LICENSE
environment variable signals your acceptance of the DataStax terms of service and is required for the software to start. -
After 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 and DDAC.