build and push instructions added
This commit is contained in:
parent
c75e40ffd8
commit
9e07d53e05
1 changed files with 25 additions and 2 deletions
27
README.md
27
README.md
|
@ -216,8 +216,31 @@ See the [releases](https://github.com/justone/dockviz/releases) area for binarie
|
||||||
# Build
|
# Build
|
||||||
|
|
||||||
```bash
|
```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
|
export CGO_ENABLED=0
|
||||||
|
|
||||||
|
# build go program
|
||||||
|
cd dockviz
|
||||||
go get
|
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
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue