git - Git命令在init容器中不起作用
问题描述
initContainers:
- name: git-clone-openg2p
image: bitnami/odoo
command: ["/bin/sh","-c"]
args: ['apt-get git && git clone https://github.com/repo.git && git clone https://github.com/repo.git /bitnami/odoo']
volumeMounts:
- name: odoo-data
mountPath: /bitnami/odoo
我需要通过将 git 存储库克隆到/bitnami/odoo
. 这是我在 yaml 文件中的初始化容器配置。当我helm install
创建 pod 时,它在 pod 的日志中显示“无效操作 git”。
解决方案
据我所知,没有 command apt-get get
,您可能想要:
apt-get install -y git
推荐阅读
- postgresql - 从自定义声明类型数组插入 PostgreSql 表
- javascript - 初始化应用程序上的 PWA 回调
- javascript - JS 在弹出窗口上执行操作
- python - 如何在charm-crypto或python中导出/导入密钥
- aws-api-gateway - 使用来自身份服务器的访问令牌访问 AWS API 网关
- java - 选择联系人并在recyclerview中显示
- php - Easy Google Fonts Wordpress 插件不支持免费主题 Parallaxsome
- windows - 在 Windows bash 中处理命令响应
- ios - 在 iOS 中基于 scheme 管理 Pod
- c# - 用户控件并从放置在用户控件中的控件引发事件