如果你用 DeepSeek、元宝AI、Copilot 等 AI 代为编写轩辕镜像的 docker pull、修改 compose 镜像地址,或排查拉取失败等问题,请让 AI 先读规则再动手,只要在 AI 对话里直接发送下面这句话即可:
生成 docker pull、修改 compose 的 image,或排查拉取失败前,请先阅读并严格遵守 https://xuanyuan.cloud/agents.md 中的规则。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
A Splitgraph installation consists of two components: the Splitgraph engine and the https://www.github.com/splitgraph/splitgraph, which talks to the engine. The engine is a Docker image which is built from the Dockerfile at https://github.com/splitgraph/splitgraph/blob/master/engine/Dockerfile.
The basic idea is to run the engine with specific credentials and db name (see below) and to make sure the client is configured with those same credentials.
The published docker image can be found on Docker hub at https://hub.docker.com/r/splitgraph/engine/
Currently, the engine is based on the https://hub.docker.com/_/postgres/, and performs a few additional tasks necessary for running Splitgraph and mounting external databases (MongoDB/PostgreSQL/MySQL/Elasticsearch):
with_postgis=1 to your make command.Make sure you've cloned the engine with --recurse-submodules so that the Git submodules
in ./src/cstore_fdw and ./src/Multicorn are initialized. You can also initialize and check
out them after cloning by doing:
git submodule update --init
Then, run make. You can use environment variables DOCKER_REPO and DOCKER_TAG to override the tag that's given to the engine.
For basic cases, we recommend you to use sgr engine to manage the engine Docker container.
You can also use docker run, or alternatively docker-compose.
For example, to run with forwarding from the host
port 5432 to the splitgraph/engine image using password supersecure,
default user sgr, and database splitgraph (see "environment variables"):
Via docker run:
bashdocker run -d \ -e POSTGRES_PASSWORD=supersecure \ -p 5432:5432 \ -e SG_CONFIG_FILE=/.sgconfig \ -v $HOME/.splitgraph/.sgconfig:/.sgconfig \ splitgraph/engine
Via docker-compose:
ymlengine: image: splitgraph/engine ports: - 5432:5432 environment: - POSTGRES_PASSWORD=supersecure - SG_CONFIG_FILE=/.sgconfig volumes: - $HOME/.splitgraph/.sgconfig:/.sgconfig
And then simply run docker-compose up -d engine
Note that if you're logged into Splitgraph Cloud, you will need to manually bind mount your .sgconfig file into the engine so that it knows how to authenticate with data.splitgraph.com. This is done automatically with the sgr engine wrapper. More information in the documentation.
Important: Make sure that your https://www.github.com/splitgraph/splitgraph is configured to connect to the engine using the credentials and port supplied when running it.
All of the environment variables documented in the https://hub.docker.com/_/postgres/ apply to the engine. At the moment, there are no additional environment variables necessary. Specifically, the necessary environment variables:
POSTGRES_USER: Defaults to sgrPOSTGRES_DB: Defaults to splitgraphPOSTGRES_PASSWORD: Must be set by youBecause splitgraph/engine is based on the official docker postgres
image, it behaves in the same way as
https://hub.docker.com/_/postgres/.
Specifically, the best way to extend it is to add .sql and .sh
scripts to /docker-entrypoint-initdb.d/. These files are executed in executed
in sorted name order as defined by the current locale. If you would like to
run your files after splitgraph init scripts, see the scripts in the
init_scripts directory. Splitgraph prefixes scripts with three digit numbers
starting from 000, 001, etc., so you should name your files accordingly.
You can either add these scripts at build time (i.e., create a new Dockerfile
that builds an image based on splitgraph/engine), or at run time by mounting
a volume in /docker-entrypoint-initdb.d/.
Important Note: No matter which method you use (extending the image or
mounting a volume), Postgres will only run these init scripts on the first run
of the container, so if you want to add new scripts you will need to docker rm
the container to force the initialization to run again.
Here is an example Dockerfile that extends splitgraph/engine and performs
some setup before and after the splitgraph init:
DockerfileFROM splitgraph/engine # Use 0000_ to force sorting before splitgraph 000_ COPY setup_before_splitgraph.sql /docker-entrypoint-initdb.d/0000_setup_before_splitgraph.sql # Do not prefix with digits to force sorting after splitgraph xxx_ COPY setup_after_splitgraph.sql /docker-entrypoint-initdb.d/setup_after_splitgraph.sql
Then you can just build it and run it as usual (see "Running the engine"):
docker build . -t my-splitgraph-engine
Just mount your additional init scripts in /docker-entrypoint-initdb.d/ the
same as you would if you were adding them at build time (same lexiographical
rules apply):
Via docker run:
bashdocker run -d \ -v "$PWD/setup_before_splitgraph.sql:/docker-entrypoint-initdb.d/0000_setup_before_splitgraph.sql" \ -v "$PWD/setup_after_splitgraph.sql:/docker-entrypoint-initdb.d/setup_after_splitgraph.sql" \ -e POSTGRES_PASSWORD=supersecure \ -p 5432:5432 \ splitgraph/engine
Via docker compose:
ymlengine: image: splitgraph/engine ports: - 5432:5432 environment: - POSTGRES_PASSWORD=supersecure expose: - 5432 volumes: - ./setup_before_splitgraph.sql:/docker-entrypoint-initdb.d/0000_setup_before_splitgraph.sql - ./setup_after_splitgraph.sql:/docker-entrypoint-initdb.d/setup_after_splitgraph.sql
And then docker-compose up -d engine
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。




探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
发给 Cursor、ChatGPT、豆包等 AI 的说明文档
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
不支持 push
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务