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/

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章