轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥7起我的订单
文档
工具
提交工单页面收录
cassandra

library/cassandra

Docker 官方镜像

Apache Cassandra是一款开源的分布式存储系统。

1.6千 次收藏下载次数: 0状态:Docker 官方镜像维护者:Docker 官方镜像仓库类型:镜像最近更新:1 个月前
让 AI 帮你使用轩辕镜像? · 展开查看说明 · 点击收起说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

DockerHub 官方简介
轩辕镜像中文简介
下载命令
镜像标签列表与下载命令
轩辕镜像,不浪费每一次拉取。
点击查看

Quick reference

  • Maintained by:
    https://github.com/docker-library/cassandra

  • Where to get help:
    https://dockr.ly/comm-slack, Server Fault, https://unix.stackexchange.com/help/on-topic, or https://stackoverflow.com/help/on-topic

Supported tags and respective Dockerfile links

  • https://github.com/docker-library/cassandra/blob/7b9da8f4f58f48af79feb0fc2f7a1e2c639965f1/5.0/Dockerfile

  • https://github.com/docker-library/cassandra/blob/f304ac2a02e00150b7e6629a40fcbd2891a0ba62/4.1/Dockerfile

  • https://github.com/docker-library/cassandra/blob/a99c4aa59e96ab881db88b13ca0d4fd086b9a4dd/4.0/Dockerfile

Quick reference (cont.)

  • Where to file issues:
    https://github.com/docker-library/cassandra/issues?q=

  • Supported architectures: (https://github.com/docker-library/official-images#architectures-other-than-amd64)
    https://hub.docker.com/r/amd64/cassandra/, https://hub.docker.com/r/arm32v7/cassandra/, https://hub.docker.com/r/arm64v8/cassandra/, https://hub.docker.com/r/ppc64le/cassandra/, https://hub.docker.com/r/s390x/cassandra/

  • Published image artifact details:
    https://github.com/docker-library/repo-info/blob/master/repos/cassandra (https://github.com/docker-library/repo-info/commits/master/repos/cassandra)
    (image metadata, transfer size, etc)

  • Image updates:
    https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fcassandra
    https://github.com/docker-library/official-images/blob/master/library/cassandra (https://github.com/docker-library/official-images/commits/master/library/cassandra)

  • Source of this description:
    https://github.com/docker-library/docs/tree/master/cassandra (https://github.com/docker-library/docs/commits/master/cassandra)

What is Cassandra?

Apache Cassandra is an open source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. Cassandra offers robust support for clusters spanning multiple datacenters, with asynchronous masterless replication allowing low latency operations for all clients.

***.org/wiki/Apache_Cassandra

!https://raw.githubusercontent.com/docker-library/docs/fb8596d619703fc556e6d56e***d8bfdf***/cassandra/logo.png

How to use this image

Start a cassandra server instance

Starting a Cassandra instance is simple:

console
$ docker run --name some-cassandra --network some-network -d cassandra:tag

... where some-cassandra is the name you want to assign to your container and tag is the tag specifying the Cassandra version you want. See the list above for relevant tags.

Make a cluster

Using the environment variables documented below, there are two cluster scenarios: instances on the same machine and instances on separate machines. For the same machine, start the instance as described above. To start other instances, just tell each new node where the first is.

console
$ docker run --name some-cassandra2 -d --network some-network -e CASSANDRA_SEEDS=some-cassandra cassandra:tag

For separate machines (ie, two VMs on a cloud provider), you need to tell Cassandra what IP address to advertise to the other nodes (since the address of the container is behind the docker bridge).

Assuming the first machine's IP address is 10.42.42.42 and the second's is 10.43.43.43, start the first with exposed gossip port:

console
$ docker run --name some-cassandra -d -e CASSANDRA_BROADCAST_ADDRESS=10.42.42.42 -p 7000:7000 cassandra:tag

Then start a Cassandra container on the second machine, with the exposed gossip port and seed pointing to the first machine:

console
$ docker run --name some-cassandra -d -e CASSANDRA_BROADCAST_ADDRESS=10.43.43.43 -p 7000:7000 -e CASSANDRA_SEEDS=10.42.42.42 cassandra:tag

Connect to Cassandra from cqlsh

The following command starts another Cassandra container instance and runs cqlsh (Cassandra Query Language Shell) against your original Cassandra container, allowing you to execute CQL statements against your database instance:

console
$ docker run -it --network some-network --rm cassandra cqlsh some-cassandra

More information about the CQL can be found in the https://cassandra.apache.org/doc/latest/cql/index.html.

Container shell access and viewing Cassandra logs

The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your cassandra container:

console
$ docker exec -it some-cassandra bash

The Cassandra Server log is available through Docker's container log:

console
$ docker logs some-cassandra

Configuring Cassandra

The best way to provide configuration to the cassandra image is to provide a custom /etc/cassandra/cassandra.yaml file. There are many ways to provide this file to the container (via short Dockerfile with FROM + COPY, via https://docs.docker.com/engine/swarm/configs/, via runtime bind-mount, etc), the details of which are left as an exercise for the reader.

To use a different file name (for example, to avoid all image-provided configuration behavior), use -Dcassandra.config=/path/to/cassandra.yaml as an argument to the image (as in, docker run ... cassandra -Dcassandra.config=/path/to/cassandra.yaml).

There are a small number of environment variables supported by the image which will modify /etc/cassandra/cassandra.yaml in some way (but the script is modifying YAML, so is naturally fragile):

  • CASSANDRA_LISTEN_ADDRESS: This variable is for controlling which IP address to listen for incoming connections on. The default value is auto, which will set the listen_address option in cassandra.yaml to the IP address of the container as it starts. This default should work in most use cases.

  • CASSANDRA_BROADCAST_ADDRESS: This variable is for controlling which IP address to advertise to other nodes. The default value is the value of CASSANDRA_LISTEN_ADDRESS. It will set the broadcast_address and broadcast_rpc_address options in cassandra.yaml.

  • CASSANDRA_RPC_ADDRESS: This variable is for controlling which address to bind the thrift rpc server to. If you do not specify an address, the wildcard address (0.0.0.0) will be used. It will set the rpc_address option in cassandra.yaml.

  • CASSANDRA_START_RPC: This variable is for controlling if the thrift rpc server is started. It will set the start_rpc option in cassandra.yaml.

  • CASSANDRA_SEEDS: This variable is the comma-separated list of IP addresses used by gossip for bootstrapping new nodes joining a cluster. It will set the seeds value of the seed_provider option in cassandra.yaml. The CASSANDRA_BROADCAST_ADDRESS will be added the seeds passed in so that the server will talk to itself as well.

  • CASSANDRA_CLUSTER_NAME: This variable sets the name of the cluster and must be the same for all nodes in the cluster. It will set the cluster_name option of cassandra.yaml.

  • CASSANDRA_NUM_TOKENS: This variable sets number of tokens for this node. It will set the num_tokens option of cassandra.yaml.

  • CASSANDRA_DC: This variable sets the datacenter name of this node. It will set the dc option of cassandra-rackdc.properties. You must set CASSANDRA_ENDPOINT_SNITCH to use the "GossipingPropertyFileSnitch" in order for Cassandra to apply cassandra-rackdc.properties, otherwise this variable will have no effect.

  • CASSANDRA_RACK: This variable sets the rack name of this node. It will set the rack option of cassandra-rackdc.properties. You must set CASSANDRA_ENDPOINT_SNITCH to use the "GossipingPropertyFileSnitch" in order for Cassandra to apply cassandra-rackdc.properties, otherwise this variable will have no effect.

  • CASSANDRA_ENDPOINT_SNITCH: This variable sets the snitch implementation this node will use. It will set the endpoint_snitch option of cassandra.yml.

Caveats

Where to Store Data

Important note: There are several ways to store data used by applications that run in Docker containers. We encourage users of the cassandra images to familiarize themselves with the options available, including:

  • Let Docker manage the storage of your database data https://docs.docker.com/storage/volumes/. This is the default and is easy and fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers.
  • Create a data directory on the host system (outside the container) and https://docs.docker.com/storage/bind-mounts/. This places the database files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that e.g. directory permissions and other security mechanisms on the host system are set up correctly.

The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above:

  1. Create a data directory on a suitable volume on your host system, e.g. /my/own/datadir.

  2. Start your cassandra container like this:

    console
    $ docker run --name some-cassandra -v /my/own/datadir:/var/lib/cassandra -d cassandra:tag
    

The -v /my/own/datadir:/var/lib/cassandra part of the command mounts the /my/own/datadir directory from the underlying host system as /var/lib/cassandra inside the container, where Cassandra by default will write its data files.

No connections until Cassandra init completes

If there is no database initialized when the container starts, then a default database will be created. While this is the expected behavior, this means that it will not accept incoming connections until such initialization completes. This may cause issues when using automation tools, such as Docker Compose, which start several containers simultaneously.

License

View https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=blob;f=LICENSE.txt;hb=cassandra-3.11.1 for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in https://github.com/docker-library/repo-info/tree/master/repos/cassandra.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 cassandra 镜像标签

docker pull docker.xuanyuan.run/cassandra:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull cassandra:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

一键安装

一键安装 Docker

Linux Docker 一键安装

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

版本功能对比

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
Docker 官方镜像
...
library/cassandra
教程轩辕镜像功能与使用教程
定价查看流量套餐与价格
热门查看热门 Docker 镜像推荐
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥7/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥7/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
商务合作:点击复制邮箱
用户协议·隐私政策·©2024-2026 源码跳动
用户协议·隐私政策©2024-2026 杭州源码跳动科技有限公司商务合作:点击复制邮箱

更多 cassandra 镜像推荐

bitnamicharts/cassandra logo

bitnamicharts/cassandra

bitnamicharts
Bitnami提供的Apache Cassandra Helm Chart,用于在Kubernetes集群上部署开源分布式数据库Apache Cassandra,支持高可用性、无单点故障,适用于处理跨多服务器的大量数据。
1 次收藏100万+ 次下载
10 个月前更新
circleci/cassandra logo

circleci/cassandra

circleci
此镜像仅供内部使用
10万+ 次下载
9 年前更新
rook/cassandra logo

rook/cassandra

rook
Apache Cassandra是一款开源、分布式的宽列存储NoSQL数据库管理系统,旨在高效处理大规模结构化数据,提供高可用性、线性可扩展性和分布式架构支持。
100万+ 次下载
4 年前更新
itzg/cassandra logo

itzg/cassandra

itzg
一个Cassandra镜像,专门优化了容器内和非容器客户端的访问权限,支持来自Docker容器和外部非Docker客户端的连接。
2 次收藏5万+ 次下载
10 年前更新
rootpublic/cassandra logo

rootpublic/cassandra

rootpublic
暂无描述
241 次下载
5 个月前更新
openeuler/cassandra logo

openeuler/cassandra

openeuler
基于openEuler的官方Cassandra Docker镜像,用于处理大规模数据的分布式数据库管理系统,支持集群和多数据中心部署,具备异步无主复制、低延迟操作特性,集成Dynamo分布式存储与Bigtable数据引擎模型。
480 次下载
2 个月前更新

查看更多 cassandra 相关镜像

更多相关 Docker 镜像与资源

以下是 cassandra 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:

  • bitnami/cassandra Docker 镜像说明(Bitnami Apache Cassandra,适合宽列分布式 NoSQL 存储)
  • library/mongo Docker 镜像说明
  • amd64/mongo Docker 镜像说明(MongoDB 数据库,AMD64 架构版本)
  • arm64v8/mongo Docker 镜像说明(arm64v8 架构 MongoDB,适合 ARM64 文档数据库部署)
  • mongodb/mongodb-community-server Docker 镜像说明(MongoDB 社区版,NoSQL 文档数据库,适合灵活数据模型)