From 9e07d53e056023085611388c6fd222c64099f55c Mon Sep 17 00:00:00 2001 From: fabianlee Date: Tue, 23 May 2017 23:52:57 +0000 Subject: [PATCH] build and push instructions added --- README.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a9a95eb..5a45d50 100644 --- a/README.md +++ b/README.md @@ -216,8 +216,31 @@ See the [releases](https://github.com/justone/dockviz/releases) area for binarie # Build ```bash -# force static compilation +# install graphviz in host environment for rendering (Debian example) +sudo apt-get install git graphviz -y + +# pull latest code +cd $GOPATH +git clone https://github.com/fabianlee/dockviz.git + +# force static compilation for go language export CGO_ENABLED=0 + +# build go program +cd dockviz go get -go build +go build -a + +# build docker image +docker build --no-cache=true -t "fabianlee/dockviz:1.0" -t "fabianlee/dockviz:latest" . + +# push to docker hub +docker login --username=fabianlee --password=xxxxxxx +docker push fabianlee/dockviz + ``` + + + + +