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/

 

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