docker-compose启动cassandra

tech2023-10-11  102

1.目录结构如下

2.具体内容如下

docker-compose.yml

version: '2' services: cassandra: image: 'docker.io/bitnami/cassandra:3-debian-10' ports: - '7000:7000' - '9042:9042' volumes: - ./cassandra_data:/bitnami environment: - CASSANDRA_SEEDS=cassandra - CASSANDRA_PASSWORD_SEEDER=yes - CASSANDRA_PASSWORD=cassandra

创建一个空目录 cassandra_data

mkdir cassandra_data chmod 777 cassandra_data

3.启动

docker-compose up -d
最新回复(0)