Created
October 14, 2025 00:58
-
-
Save jianyun8023/bc97f65200818893187f2c8738386795 to your computer and use it in GitHub Desktop.
goharbor/redis-photon 升级 redis 版本 修复 CVE lua 漏洞
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 基于 goharbor/redis-photon:v2.14.0 升级 Redis 到 7.2.11 | |
| # 使用多阶段构建来从官方 Redis 镜像复制二进制文件 | |
| # 第一阶段:从官方 Redis 7.2.11 镜像获取二进制文件 | |
| FROM redis:7.2.11 AS redis-source | |
| # 第二阶段:基于更新的 goharbor 镜像(避免 glibc 版本兼容性问题) | |
| FROM goharbor/redis-photon:v2.14.0 | |
| # 由于基于 v2.14.0,系统库已经较新,直接复制二进制文件即可 | |
| # 从第一阶段复制新的 Redis 二进制文件,直接覆盖原有文件并设置权限 | |
| COPY --from=redis-source --chown=root:root --chmod=755 /usr/local/bin/redis-server /usr/bin/redis-server | |
| COPY --from=redis-source --chown=root:root --chmod=755 /usr/local/bin/redis-cli /usr/bin/redis-cli | |
| # 验证新版本 | |
| RUN redis-server --version | |
| # 保留原有的配置文件和启动方式 | |
| # /etc/redis.conf 和其他配置文件保持不变 | |
| # 使用原有的启动命令和配置 | |
| CMD ["redis-server", "/etc/redis.conf"] |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
redis 7.2.11 release: https://github.com/redis/redis/releases/tag/7.2.11
构建和测试命令