
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Current Redis™ software Docker Image https://ubuntu.com/security/docker-images, based on Ubuntu. Receives security updates and tracks the newest combination of Redis™ software and Ubuntu. This repository is free to use and exempted from per-user rate limits.
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster. Read more on the https://redis.io/topics/introduction.
!https://assets.ubuntu.com/v1/0a5ff561-LTS%402x.png?h=17 Up to 5 years free security maintenance on LTS channels.
!https://assets.ubuntu.com/v1/572f3fbd-ESM%402x.png?h=17
Up to 10 years customer security maintenance from canonical/redis. https://ubuntu.com/security/docker-images#get-in-touch.
Tags in italics are not available in ubuntu/redis but are shown here for completeness.
| Channel Tag | Currently | Architectures | ||
|---|---|---|---|---|
6.2-22.04_beta | Redis™ software 6.2 on Ubuntu 22.04 LTS | amd64, arm64, ppc64el, s390x | ||
track_risk |
Channel Tag shows the most stable channel for that track. A track is a combination of both the application version and the underlying Ubuntu series, eg 1.0-22.04.
Channels are ordered from the most stable to the least stable, candidate, beta, edge.
More risky channels are always implicitly available.
So if beta is listed, you can also pull edge. If candidate is listed, you can pull beta and edge.
When stable is listed, all four are available.
Images are guaranteed to progress through the sequence edge, beta, candidate before stable.
If your usage includes commercial redistribution or requires unavailable channels/versions, please https://ubuntu.com/security/docker-images#get-in-touch (or using ***).
Launch this image locally:
shdocker run -d --name redis-container -e TZ=UTC -p 30073:6379 -e REDIS_PASSWORD=mypassword ubuntu/redis:6.2-22.04_beta
Access your Redis server at localhost:30073.
Parameters
| Parameter | Description |
|---|---|
-e TZ=UTC | Timezone. |
-e ALLOW_EMPTY_PASSWORD | Set to yes to allow connections to redis-server without a password. This setting is not recommended in production environments. |
-e REDIS_PASSWORD | Set the desired password to be used. |
-e REDIS_RANDOM_PASSWORD | Set this variable to 1 if you would like the entrypoint script to generate a random password for you. You will be able to see the generated password in the logs (docker logs). |
-e REDIS_ALLOW_REMOTE_CONNECTIONS=yes | Set to no to disallow remote connections to redis-server (i.e., make redis-server listen to 127.0.0.1 only). |
-e REDIS_EXTRA_FLAGS | Specify extra flags to be passed to redis-server when initializing it. |
-p 30073:6379 | Expose redis on localhost:30073. |
-v /path/to/redis.conf:/etc/redis/redis.conf | Local https://redis.io/topics/config redis.conf (try https://git.launchpad.net/~ubuntu-docker-images/ubuntu-docker-images/+git/redis/plain/examples/config/redis.conf?h=6.2-22.04). To enable TLS mode, comment the port 6379 line and uncomment the # port 0 and # tls-port 6379 lines. |
Testing/Debugging
To debug the container:
shdocker logs -f redis-container
To get an interactive shell:
shdocker exec -it redis-container /bin/bash
This image also includes the redis-cli client for interactive container use:
sh$ docker network create redis-network $ docker network connect redis-network redis-container $ docker run -it --rm --network redis-network ubuntu/redis:6.2-22.04_beta redis-cli -h redis-container
Now you can:
redis:6379> AUTH mypassword OK redis:6379> PING PONG redis:6379>
Works with any Kubernetes; if you don't have one, we recommend you https://microk8s.io/ and microk8s.enable dns storage then snap alias microk8s.kubectl kubectl.
Download
https://git.launchpad.net/~ubuntu-docker-images/ubuntu-docker-images/+git/redis/plain/examples/config/redis.conf?h=6.2-22.04 and
https://git.launchpad.net/~ubuntu-docker-images/ubuntu-docker-images/+git/redis/plain/examples/redis-deployment.yml?h=6.2-22.04 and set containers.redis.image in redis-deployment.yml to your chosen channel tag (e.g. ubuntu/redis:6.2-22.04_beta), then:
shkubectl create configmap redis-config --from-file=redis=redis.conf kubectl apply -f redis-deployment.yml
You will now be able to connect to the Redis server on localhost:30073.
If you find a bug in our image or want to request a specific feature, please file a bug here:
https://bugs.launchpad.net/ubuntu-docker-images/+filebug
Please title the bug "redis: <issue summary>". Make sure to include the digest of the image you are using, from:
shdocker images --no-trunc --quiet ubuntu/redis:<tag>
These channels (tags) are not updated anymore. Please upgrade to newer channels, or https://ubuntu.com/security/docker-images#get-in-touch if you can't upgrade.
| Track | Version | EOL | Upgrade Path |
|---|---|---|---|
| Redis™ software 6.0.15 on Ubuntu 21.10 | 07/2022 | 6.2-22.04_beta | |
| Redis™ software 6.0.11 on Ubuntu 21.04 | 01/2022 | | |
| Redis™ software 5.0.7 on Ubuntu 20.04 LTS | 01/2021 | | |
track |
以下是 ubuntu/redis 相关的常用 Docker 镜像,适用于 缓存、高可用、数据分析 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务