专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏

clickhouse/clickhouse-server Docker 镜像 - 轩辕镜像

clickhouse-server
clickhouse/clickhouse-server
ClickHouse是一款由俄罗斯Yandex公司开发的开源面向列的数据库管理系统,专为在线分析处理(OLAP)场景设计,采用高效的列式存储结构,能够快速处理PB级大规模数据,支持实时数据查询与分析,具备高吞吐量、低延迟的性能优势,广泛应用于数据仓库、日志分析、业务监控等领域,为企业提供高效的数据处理解决方案。
271 收藏0 次下载activeclickhouse镜像
🚀专业版镜像服务,面向生产环境设计
版本下载
🚀专业版镜像服务,面向生产环境设计

ClickHouse Server Docker Image

What is ClickHouse?

ClickHouse is an open-source column-oriented DBMS (columnar database management system) for online analytical processing (OLAP) that allows users to generate analytical reports using SQL queries in real-time.

ClickHouse works 100-1000x faster than traditional database management systems, and processes hundreds of millions to over a billion rows and tens of gigabytes of data per server per second. With a widespread user base around the globe, the technology has received praise for its reliability, ease of use, and fault tolerance.

For more information and documentation see [***]

Versions

  • The latest tag points to the latest release of the latest stable branch.
  • Branch tags like 22.2 point to the latest release of the corresponding branch.
  • Full version tags like 22.2.3 and 22.2.3.5 point to the corresponding release.
  • The tag head is built from the latest commit to the default branch.
  • Each tag has optional -alpine suffix to reflect that it's built on top of alpine.
Compatibility
  • The amd64 image requires support for SSE3 instructions. Virtually all x86 CPUs after 2005 support SSE3.
  • The arm64 image requires support for the ARMv8.2-A architecture and additionally the Load-Acquire RCpc register. The register is optional in version ARMv8.2-A and mandatory in ARMv8.3-A. Supported in Graviton >=2, Azure and GCP instances. Examples for unsupported devices are Raspberry Pi 4 (ARMv8.0-A) and Jetson AGX Xavier/Orin (ARMv8.2-A).
  • Since the Clickhouse 24.11 Ubuntu images started using ubuntu:22.04 as its base image. It requires docker version >= 20.10.10 containing patch. As a workaround you could use docker run --security-opt seccomp=unconfined instead, however that has security implications.

How to use this image

start server instance
bash
docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server

By default, ClickHouse will be accessible only via the Docker network. See the networking section below.

By default, starting above server instance will be run as the default user without password.

connect to it from a native client
bash
docker run -it --rm --network=container:some-clickhouse-server --entrypoint clickhouse-client clickhouse/clickhouse-server
# OR
docker exec -it some-clickhouse-server clickhouse-client

More information about the ClickHouse client.

connect to it using curl
bash
echo "SELECT 'Hello, ClickHouse!'" | docker run -i --rm --network=container:some-clickhouse-server buildpack-deps:curl curl 'http://localhost:8123/?query=' -s --data-binary @-

More information about the ClickHouse HTTP Interface.

stopping / removing the container
bash
docker stop some-clickhouse-server
docker rm some-clickhouse-server
networking

⚠️ Note: the predefined user default does not have the network access unless the password is set, see "How to create default database and user on starting" and "Managing default user" below

You can expose your ClickHouse running in docker by mapping a particular port from inside the container using host ports:

bash
docker run -d -p ***:8123 -p***:9000 -e CLICKHOUSE_PASSWORD=changeme --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server
echo 'SELECT version()' | curl 'http://localhost:***/?password=changeme' --data-binary @-

22.6.3.35

Or by allowing the container to use host ports directly using --network=host (also allows achieving better network performance):

bash
docker run -d --network=host --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server
echo 'SELECT version()' | curl 'http://localhost:8123/' --data-binary @-

22.6.3.35

⚠️ Note: the user default in the example above is available only for the localhost requests

Volumes

Typically you may want to mount the following folders inside your container to achieve persistency:

  • /var/lib/clickhouse/ - main folder where ClickHouse stores the data
  • /var/log/clickhouse-server/ - logs
bash
docker run -d \
    -v "$PWD/ch_data:/var/lib/clickhouse/" \
    -v "$PWD/ch_logs:/var/log/clickhouse-server/" \
    --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server

You may also want to mount:

  • /etc/clickhouse-server/config.d/*.xml - files with server configuration adjustments
  • /etc/clickhouse-server/users.d/*.xml - files with user settings adjustments
  • /docker-entrypoint-initdb.d/ - folder with database initialization scripts (see below).
Linux capabilities

ClickHouse has some advanced functionality, which requires enabling several Linux capabilities.

They are optional and can be enabled using the following docker command-line arguments:

bash
docker run -d \
    --cap-add=SYS_NICE --cap-add=NET_ADMIN --cap-add=IPC_LOCK \
    --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server

Read more in knowledge base.

Configuration

The container exposes port 8123 for the HTTP interface and port 9000 for the native client.

ClickHouse configuration is represented with a file "config.xml" (documentation)

Start server instance with custom configuration
bash
docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 -v /path/to/your/config.xml:/etc/clickhouse-server/config.xml clickhouse/clickhouse-server
Start server as custom user
bash
# $PWD/data/clickhouse should exist and be owned by current user
docker run --rm --user "${UID}:${GID}" --name some-clickhouse-server --ulimit nofile=262144:262144 -v "$PWD/logs/clickhouse:/var/log/clickhouse-server" -v "$PWD/data/clickhouse:/var/lib/clickhouse" clickhouse/clickhouse-server

When you use the image with local directories mounted, you probably want to specify the user to maintain the proper file ownership. Use the --user argument and mount /var/lib/clickhouse and /var/log/clickhouse-server inside the container. Otherwise, the image will complain and not start.

Start server from root (useful in case of enabled user namespace)
bash
docker run --rm -e CLICKHOUSE_RUN_AS_ROOT=1 --name clickhouse-server-userns -v "$PWD/logs/clickhouse:/var/log/clickhouse-server" -v "$PWD/data/clickhouse:/var/lib/clickhouse" clickhouse/clickhouse-server
How to create default database and user on starting

Sometimes you may want to create a user (user named default is used by default) and database on a container start. You can do it using environment variables CLICKHOUSE_DB, CLICKHOUSE_USER, CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT and CLICKHOUSE_PASSWORD:

bash
docker run --rm -e CLICKHOUSE_DB=my_database -e CLICKHOUSE_USER=username -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 -e CLICKHOUSE_PASSWORD=password -p 9000:9000/tcp clickhouse/clickhouse-server
Managing default user

The user default has disabled network access by default in the case none of CLICKHOUSE_USER, CLICKHOUSE_PASSWORD, or CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT are set.

There's a way to make default user insecurely available by setting environment variable CLICKHOUSE_SKIP_USER_SETUP to 1:

bash
docker run --rm -e CLICKHOUSE_SKIP_USER_SETUP=1 -p 9000:9000/tcp clickhouse/clickhouse-server

How to extend this image

To perform additional initialization in an image derived from this one, add one or more *.sql, *.sql.gz, or *.sh scripts under /docker-entrypoint-initdb.d. After the entrypoint calls initdb, it will run any *.sql files, run any executable *.sh scripts, and source any non-executable *.sh scripts found in that directory to do further initialization before starting the service.
Also, you can provide environment variables CLICKHOUSE_USER & CLICKHOUSE_PASSWORD that will be used for clickhouse-client during initialization.

For example, to add an additional user and database, add the following to /docker-entrypoint-initdb.d/init-db.sh:

bash
#!/bin/bash
set -e

clickhouse client -n <<-EOSQL
    CREATE DATABASE docker;
    CREATE TABLE docker.docker (x Int32) ENGINE = Log;
EOSQL

License

View license information for the software contained in this image.

查看更多 clickhouse-server 相关镜像 →
altinity/clickhouse-server logo
altinity/clickhouse-server
by altinity
Altinity提供的包含稳定版、FIPS认证版及测试构建版本的镜像,满足不同环境需求。
121M+ pulls
上次更新:19 天前
muxinc/clickhouse-server logo
muxinc/clickhouse-server
by muxinc
ClickHouse服务器镜像,用于大规模数据分析与OLAP场景,提供高性能列式存储和快速查询能力,支持实时数据处理及复杂分析任务。
500K+ pulls
上次更新:2 个月前
deepflowce/clickhouse-server logo
deepflowce/clickhouse-server
by deepflowce
暂无描述
100K+ pulls
上次更新:4 个月前
altinityinfra/clickhouse-server logo
altinityinfra/clickhouse-server
by altinityinfra
暂无描述
100K+ pulls
上次更新:5 天前
noenv/clickhouse-server logo
noenv/clickhouse-server
by noenv
Clickhouse Docker镜像提供高性能列式数据库管理系统,专为OLAP场景设计,支持大数据量快速查询分析,便于快速部署和运行Clickhouse服务。
110K+ pulls
上次更新:23 天前
reactivemarkets/clickhouse-server logo
reactivemarkets/clickhouse-server
by reactivemarkets
暂无描述
10K+ pulls
上次更新:6 天前

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

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

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

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

oldzhang的头像

oldzhang

运维工程师

Linux服务器

5

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

轩辕镜像
镜像详情
...
clickhouse/clickhouse-server
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
提交工单
免费获取在线技术支持请 提交工单,官方QQ群:13763429 。
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
免费获取在线技术支持请提交工单,官方QQ群: 。
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.
轩辕镜像 官方专业版 Logo
轩辕镜像轩辕镜像官方专业版
首页个人中心搜索镜像
交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 13763429