镜像registry.gitlab.com/gitlab-org/release-cli:latest使用何种包管理器?
解决GitLab CI release-cli镜像安装Git失败的问题
- 镜像
registry.gitlab.com/gitlab-org/release-cli:latest基于Alpine Linux,使用的包管理器是apk,而非apt。 - 修改你的
before_script配置为以下内容即可成功安装Git:
.some_script_before: &some_script_before - apk update - apk add --no-cache git
- 补充说明:
--no-cache参数可避免在镜像中遗留缓存文件,缩小镜像体积,适配CI环境的轻量化需求。
内容的提问来源于stack exchange,提问作者Ralf Wickum
相关产品推荐
相关产品推荐

