
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
This image contains an implementation of the encrypted datastore interface being developed as part of the DECODE project.
DECODE is a European Commission funded project exploring and piloting new technologies that give people more control over how they store, manage and use personal data generated online. More details on this project can be found at [***]
This component implements the datastore interface as defined in this repo: https://github.com/thingful/decode-protorepo.
Where to get help?
Where to file issues: https://github.com/thingful/iotstore/issues
Maintained by: https://github.com/thingful
License: https://github.com/thingful/iotstore/blob/master/LICENSE
!logo
To use the image it needs to have access to a PostgreSQL server in order to persist incoming data. This may be an existing server on your machine, but the simplest way to run the image is via docker compose. An example compose file is shown below:
yamlversion: '3' services: postgres: image: postgres:10-alpine ports: - "5432:5432" restart: always volumes: - postgres_vol:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=password - POSTGRES_USER=decode - POSTGRES_DB=postgres datastore: image: thingful/iotstore-amd64:v0.1.1 ports: - "8080:8080" restart: always environment: - IOTSTORE_DATABASE_URL=postgres://decode:password@postgres:5432/postgres?sslmode=disable depends_on: - postgres command: [ "server", "--verbose" ] volumes: postgres_vol:
The above compose file starts postgresql and the datastore containers running in verbose mode using the default postgres system database. We will need to a little more work to run with other services, but this will let you test out the basic operations of the datastore.
To start the above configuration you need to create the file shown above in a
directory, and name it docker-compose.yml, then execute the following command:
bash$ docker-compose up
After a few seconds the datastore should boot up, connect to postgres, execute any pending schema modification migrations against the database and then it will be listening on https://localhost:8080.
To verify that the server is running correctly, you can access the following URL:
http://localhost:8080/pulse
which will return a simple plain text response of ok if it is running and able to connect to the database.
The server provides an API implemented via a tool called Twirp; this is a protocol buffer based API for which we will generate and share API clients for supported languages, however it is possible to test out the server from the command line via curl.
An example of how we might write to the datastore using curl would be:
bashcurl --request "POST" \ --location "http://localhost:8080/twirp/decode.iot.datastore.Datastore/WriteData" \ --header "Content-Type: application/json" \ --silent \ --data "{\"public_key\":\"abc123\",\"data\":\"${data}\"}"
where the $data variable contains some encrypted bytes we wish to store in the datastore.
bashstart_time=$(date -d '1 hour ago' +%Y-%m-%dT%H:%M:%SZ) curl --request "POST" \ --location "http://localhost:8080/twirp/decode.iot.datastore.Datastore/ReadData" \ --header "Content-Type: application/json" \ --silent \ --data "{\"public_key\":\"abc123\", \"page_size\":3, \"start_time\": \"${start_time}\"}"
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务