prometheus-operator 源码编译镜像打包

安装gojsontoyaml、jsonnet、shellcheck

mkdir -p $GOPATH/src/github.com/brancz
cd $GOPATH/src/github.com/brancz
git clone https://github.com/brancz/gojsontoyaml.git
cd gojsontoyaml
go build
cp gojsontoyaml /usr/bin/
wget https://github.com/google/jsonnet/archive/v0.14.0.zip
unzip v0.14.0.zip
cd jsonnet-0.14.0
make 
make install

 

wget https://github.com/koalaman/shellcheck/archive/v0.7.0.zip
unzip v0.7.0.zip
cd shellcheck-0.7.0/
docker build  -t koalaman/shellcheck:stable .

最后编译prometheus-operator,并打包镜像

mkdir -p $GOPATH/src/github.com/coreos
cd $GOPATH/src/github.com/coreos
git clone https://github.com/coreos/prometheus-operator.git
cd prometheus-operator
git checkout v0.32.0
make
docker build -t coreos/prometheus-operator:v0.32.0 .

 

编译coreos/prometheus-operator过程中报错:

/bin/bash: po-crdgen: command not found

 

解决方法,执行:

cp $GOPATH/bin/po-crdgen /usr/bin/

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值