
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://img.shields.io/docker/pulls/psiwon/jena-fuseki-docker](https://hub.docker.com/r/psiwon/jena-fuseki-docker) https://img.shields.io/docker/image-size/psiwon/jena-fuseki-docker](https://hub.docker.com/r/psiwon/jena-fuseki-docker) https://img.shields.io/github/license/siwonpawel/jena-fuseki-docker](LICENSE) https://img.shields.io/github/actions/workflow/status/siwonpawel/jena-fuseki-docker/docker-image.yaml?label=CI](https://github.com/siwonpawel/jena-fuseki-docker/actions/workflows/docker-image.yaml)
Docker image for https://jena.apache.org/documentation/fuseki2/ — a SPARQL 1.1 server backed by the Apache Jena TDB RDF triple store.
Docker image: https://hub.docker.com/r/psiwon/jena-fuseki-docker
Source: https://github.com/siwonpawel/jena-fuseki-docker · Dockerfile
Base image: eclipse-temurin:21-alpine → alpine:3.21.2 (with jlink-optimized minimal JRE)
Platforms: linux/amd64, linux/arm64
This repository contains modified files derived from the official Apache Jena Docker tooling published in the Apache Jena source tree at https://github.com/apache/jena/tree/f8ab05095fe532460b77e7d355fc27934eee9edd/jena-fuseki2/jena-fuseki-docker.
Those files were adapted to support this repository's build, packaging, and publishing workflow for the Docker Hub image psiwon/jena-fuseki-docker.
This repository is based on Apache Jena materials distributed under the Apache License 2.0. It is an independent derivative work and is not an official Apache Software Foundation release.
Only Apache Jena 6.0.0 and newer are supported by this repository and its published Docker images.
Versions older than 6.0.0 are out of scope for this image and are not documented or tested here.
This image runs Apache Jena Fuseki in full server mode with the Web UI enabled by default (serverui mode). The browser-based management interface is available at http://localhost:3030/ immediately after starting the container — no extra flags needed.
Key design decisions:
FusekiServerUICmd out of the box, giving you the full Fuseki dataset management console.alpine:3.21.2 with a custom JRE built using jlink, minimising the image footprint.linux/amd64 and linux/arm64.MAIN environment variable lets you choose among four Fuseki operating modes without rebuilding.jlink-optimized minimal JRE (Eclipse Temurin 21)linux/amd64 and linux/arm64/fuseki/databases, /fuseki/logs)MAIN environment variable/fuseki/extra/bashdocker run -p 3030:3030 psiwon/jena-fuseki-docker:6.0.0 --mem /ds
The Fuseki Web UI will be available at http://localhost:3030/.
Tags correspond to the Apache Jena release version. Only tags for supported versions (6.0.0+) should be ***ed valid for use:
bashdocker pull psiwon/jena-fuseki-docker:6.0.0
Start Fuseki with an in-memory dataset at /ds:
bashdocker run -p 3030:3030 psiwon/jena-fuseki-docker:6.0.0 --mem /ds
Start Fuseki with a persistent TDB2 dataset:
bashmkdir -p databases/DB2 docker run -p 3030:3030 \ --mount type=bind,src="$PWD/databases",dst=/fuseki/databases \ psiwon/jena-fuseki-docker:6.0.0 \ --tdb2 --update --loc databases/DB2 /ds
bashdocker run -p 8080:3030 psiwon/jena-fuseki-docker:6.0.0 --mem /ds
Switch to headless mode using the MAIN environment variable:
bashdocker run -p 3030:3030 -e MAIN=main psiwon/jena-fuseki-docker:6.0.0 --mem /ds
bashdocker run -d --name fuseki -p 3030:3030 \ --mount type=bind,src="$PWD/databases",dst=/fuseki/databases \ psiwon/jena-fuseki-docker:6.0.0 \ --tdb2 --update --loc databases/DB2 /ds
| Variable | Default | Description |
|---|---|---|
MAIN | serverui | Server mode — see Server Modes |
JVM_ARGS | (unset) | JVM arguments passed directly to java (e.g. -Xmx4g -Xms1g) |
JAVA_HOME | /opt/java-minimal | Path to the bundled minimal JRE |
JENA_VERSION | (set at build time) | Fuseki version baked into the image |
FUSEKI_DIR | /fuseki | Fuseki installation directory |
FUSEKI_JAR | (set at build time) | Filename of the server JAR |
bashdocker run -p 3030:3030 \ -e JVM_ARGS="-Xmx8g -Xms2g" \ psiwon/jena-fuseki-docker:6.0.0 --mem /ds
The MAIN environment variable controls which Fuseki entry point is used:
MAIN value | Java class | Description |
|---|---|---|
serverui (default) | FusekiServerUICmd | Full server with Web UI and admin work area |
main | FusekiMainCmd | Headless server (no UI, no admin area); includes Prometheus metrics and Shiro authentication |
server-plain / plain | FusekiServerPlainCmd | Plain server with Fuseki modules, no UI; includes Prometheus and Shiro |
basic | FusekiBasicCmd | Minimal server with no additional features |
Fuseki data is stored in /fuseki/databases inside the container. Without a volume mount, all data is lost when the container stops.
bashdocker volume create fuseki-data docker run -d --name fuseki -p 3030:3030 \ --volume fuseki-data:/fuseki/databases \ psiwon/jena-fuseki-docker:6.0.0 \ --tdb2 --update --loc databases/DB2 /ds
bashmkdir -p /path/to/data/databases docker run -d --name fuseki -p 3030:3030 \ --mount type=bind,src=/path/to/data/databases,dst=/fuseki/databases \ psiwon/jena-fuseki-docker:6.0.0 \ --tdb2 --update --loc databases/DB2 /ds
Note: The
fusekiuser inside the container runs as UID/GID 1000. If you use a ***d mount, ensure the host directory is owned or writable by UID 1000:bashchown -R 1000 /path/to/data/databases
Logs are written to /fuseki/logs. To persist them:
bashdocker run -d --name fuseki -p 3030:3030 \ --volume fuseki-data:/fuseki/databases \ --mount type=bind,src="$PWD/logs",dst=/fuseki/logs \ psiwon/jena-fuseki-docker:6.0.0 --mem /ds
| Path | Contents |
|---|---|
/opt/java-minimal | jlink-optimized minimal JRE (Eclipse Temurin 21) |
/fuseki | Fuseki installation root |
/fuseki/jena-fuseki-server-*.jar | Server JAR (downloaded from Maven Central at build time) |
/fuseki/entrypoint.sh | Container entry point |
/fuseki/log4j2.properties | Logging configuration |
/fuseki/databases/ | Volume for persistent database storage |
/fuseki/logs/ | Volume for log files |
/fuseki/extra/ | Optional: additional JARs added to the classpath on startup |
Mount a directory to /fuseki/extra. Any JARs placed there are automatically added to the server classpath at startup.
The included docker-compose.yaml mounts ./databases and ./logs automatically. Edit the command: section for your Fuseki arguments, then:
bash# Build (JENA_VERSION is required) docker-compose build --build-arg JENA_VERSION=6.0.0 # Temporary run — in-memory dataset docker-compose run --rm --service-ports fuseki --mem /ds # Persistent TDB2 dataset mkdir -p databases/DB2 docker-compose run --rm --name MyServer --service-ports fuseki \ --tdb2 --update --loc databases/DB2 /ds
To add --update access, include it in the command:
bashdocker-compose run --rm --name MyServer --service-ports fuseki \ --tdb2 --update --loc databases/DB2 /ds
bash# Single-platform build docker build --build-arg JENA_VERSION=6.0.0 -t psiwon/jena-fuseki-docker:6.0.0 . # Multi-platform build with Docker Buildx (push required for multi-platform) docker buildx build \ --platform linux/amd64,linux/arm64 \ --build-arg JENA_VERSION=6.0.0 \ -t psiwon/jena-fuseki-docker:6.0.0 \ --push .
The
JENA_VERSIONbuild argument is required. Omitting it causes the build to fail with an explicit error.
Only
JENA_VERSION=6.0.0or newer is supported.
Because data lives in an external volume, upgrading only requires swapping the container:
bashdocker pull psiwon/jena-fuseki-docker:5.4.0 docker stop fuseki docker rm fuseki docker run -d --name fuseki -p 3030:3030 \ --volume fuseki-data:/fuseki/databases \ psiwon/jena-fuseki-docker:5.4.0 \ --tdb2 --update --loc databases/DB2 /ds
bash# View logs docker logs fuseki # Follow logs in real time docker logs -f fuseki # Stop docker stop fuseki # Restart (remembers port and volume config) docker restart fuseki
Any https://jena.apache.org/documentation/fuseki2/fuseki-server.html can be passed after the image name:
bash# In-memory dataset (not persistent) docker run -p 3030:3030 psiwon/jena-fuseki-docker:6.0.0 --mem /ds # TDB1 dataset, read-only docker run -p 3030:3030 \ --mount type=bind,src="$PWD/databases",dst=/fuseki/databases \ psiwon/jena-fuseki-docker:6.0.0 --loc databases/DB /ds # TDB2 dataset, updatable docker run -p 3030:3030 \ --mount type=bind,src="$PWD/databases",dst=/fuseki/databases \ psiwon/jena-fuseki-docker:6.0.0 --tdb2 --update --loc databases/DB2 /ds # Using a Fuseki configuration file docker run -p 3030:3030 \ --mount type=bind,src="$PWD/config",dst=/config \ psiwon/jena-fuseki-docker:6.0.0 --config /config/fuseki.ttl
See the https://jena.apache.org/documentation/fuseki2/fuseki-server.html for the full list of options.
| Feature | psiwon/jena-fuseki-docker | stain/jena-fuseki |
|---|---|---|
| Web UI | Enabled by default | Optional |
| Final base image | Alpine 3.21.2 | Alpine 3.19 |
| JRE | Custom minimal JRE via jlink (Temurin 21) | eclipse-temurin:21-jre-alpine |
| JAR source | Maven Central (SHA1 verified) | Apache mirrors / archive.apache.org (SHA512 verified) |
| Admin password management | Not managed by image — configure via CLI or config file | Auto-generated or -e ADMIN_PASSWORD=... |
| Shiro authentication | Not configured by image | Pre-configured via shiro.ini |
| Server mode switching | MAIN env var (4 modes) | Fixed |
| Platforms | linux/amd64, linux/arm64 | linux/amd64, linux/arm64 |
Different components in this image carry different licenses:
| Component | License |
|---|---|
| Dockerfile and scripts in this repository | Apache License 2.0 |
Apache Jena Fuseki (/fuseki/) | https://jena.apache.org/getting_involved/index.html |
| Eclipse Temurin JDK (used at build time only) | GPL 2.0 with Classpath Exception |
| Alpine Linux (base image) | https://alpinelinux.org |
6.0.0 and newer only.您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务