
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
[!NOTE] alpine-sqs仓库由Amplify Security维护,并发布于https://hub.docker.com/r/amplifysecurity/alpine-sqs%EF%BC%8C%E7%9B%B4%E8%87%B3%E7%89%B9%E5%AE%9A%E5%8A%9F%E8%83%BD%E5%90%88%E5%B9%B6%E5%88%B0%E5%8E%9F%E5%A7%8B%E4%BB%93%E5%BA%93https://github.com/roribio/alpine-sqs%E3%80%82
!https://raw.githubusercontent.com/roribio/alpine-sqs/master/banner.png
https://images.microbadger.com/badges/image/roribio16/alpine-sqs.svg](https://microbadger.com/images/roribio16/alpine-sqs "获取镜像徽章") https://images.microbadger.com/badges/version/roribio16/alpine-sqs.svg](https://microbadger.com/images/roribio16/alpine-sqs "获取版本徽章") https://img.shields.io/docker/stars/roribio16/alpine-sqs.svg](https://hub.docker.com/r/roribio16/alpine-sqs/) https://img.shields.io/docker/pulls/roribio16/alpine-sqs.svg](https://hub.docker.com/r/roribio16/alpine-sqs/) https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square](https://github.com/RichardLitt/standard-readme)
Alpine SQS提供Amazon Simple Queue Service (AWS-SQS)的容器化Java实现,基于ElasticMQ运行在Alpine Linux上,并使用Oracle Java 8 Server-JRE。它与AWS的API、CLI及Amazon Java SDK兼容,可加速本地开发过程,避免产生基础设施成本。本镜像的目标是维护一个更新的ElasticMQ Docker环境,集成Web UI以可视化队列和消息。
1. 从Docker Hub拉取镜像
bashdocker pull roribio16/alpine-sqs
2. 从源码构建
bashgit clone https://github.com/roribio/alpine-sqs.git
1. docker run 方式
适用于直接从Docker Hub拉取镜像的场景:
bashdocker run --name alpine-sqs -p 9324:9324 -p 9326:9326 -d roribio16/alpine-sqs:latest
自定义配置:通过挂载卷使用自定义配置文件(如elasticmq.conf和sqs-insight.conf):
bashdocker run --name alpine-sqs -p 9324:9324 -p 9326:9326 -v /opt/alpine-sqs:/opt/custom -d roribio16/alpine-sqs:latest
未在
/opt/custom目录中提供的配置文件将使用默认配置(位于容器/opt/config目录)
2. docker-compose up 方式
适用于已克隆仓库的场景,使用预构建镜像:
bashdocker-compose up -d
3. docker-compose up --build 方式
从源码构建并运行:
bashdocker-compose -f docker-compose.build up -d --build
注意:使用Docker Compose方法需克隆仓库并安装Docker Compose。不同平台可能需要调整卷挂载方式,详见https://github.com/roribio/alpine-sqs/wiki/Sharing-files-with-host-machine%E3%80%82
默认队列
默认配置自动创建"default"队列,可通过以下URL访问:http://localhost:9324/queue/default
死信队列
默认死信队列为"dlq",配置详情见https://github.com/softwaremill/elasticmq#automatically-creating-queues-on-startup
发送消息(AWS CLI示例)
bashaws --endpoint-url http://localhost:9324 sqs send-message --queue-url http://localhost:9324/queue/default --message-body "Hello, queue!"
查看消息
http://localhost:9326(基于sqs-insight)bashaws --endpoint-url http://localhost:9324 sqs receive-message --queue-url http://localhost:9324/queue/default --wait-time-seconds 10
注意:Web UI已从9325端口迁移至9326端口,9325端口现在用于ElasticMQ的统计API。
使用AWS CLI
bashaws --endpoint-url http://localhost:9324 sqs create-queue --queue-name newqueue
编辑ElasticMQ配置文件
修改elasticmq.conf文件,在queues块中添加新队列配置:
queues { default { defaultVisibilityTimeout = 10 seconds delay = 5 seconds receiveMessageWait = 0 seconds }, newqueue { defaultVisibilityTimeout = 10 seconds delay = 5 seconds receiveMessageWait = 0 seconds } }
修改后需重启ElasticMQ:
bashdocker exec -it alpine-sqs sh -c "supervisorctl restart elasticmq"
在Web UI中注册新队列
编辑sqs-insight.conf文件,添加新队列端点(无需重启UI服务):
json"endpoints": [ { "key": "notValidKey", "secretKey": "notValidSecret", "region": "eu-central-1", "url": "http://localhost:9324/queue/default" }, { "key": "notValidKey", "secretKey": "notValidSecret", "region": "eu-central-1", "url": "http://localhost:9324/queue/newqueue" } ]
除
url外,其他字段为sqs-insight必填项,但对本地队列无实际影响,可使用示例值。
Ronald E. Oribio R. - https://github.com/roribio
接受并鼓励PR!如有问题、需求或建议,请提交至项目https://github.com/roribio/alpine-sqs/issues%E3%80%82
注意:编辑本README时,请遵循https://github.com/RichardLitt/standard-readme%E8%A7%84%E8%8C%83%E3%80%82
Copyright 2017 Ronald E. Oribio R.
本项目采用GNU General Public License v3.0授权,详见LICENSE文件。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务