zenoss/zminion — pull request #4 by wplu (2014-09-04 16:56:44+00:00)
Title: clean PKGROOT; specify workdir instead of in Dockerfile

DEMO:
```
# plu@plu-9: make docker-tgz
docker build -t zenoss/zminion-build:0.1.0 hack
Sending build context to Docker daemon 3.584 kB
Sending build context to Docker daemon
Step 0 : FROM ubuntu:trusty
---> c4ff7513909d
...
Step 10 : RUN go get github.com/tools/godep
---> Running in 0351281b39ac
---> 1ee1b85ca70d
Removing intermediate container 0351281b39ac
Successfully built 1ee1b85ca70d
docker run --rm -v `pwd`:/go/srcRL -w /go/srcRL -e DUID=1000 -e DGID=1000 zenoss/zminion-build:0.1.0 make tgz
mkdir -p /tmp/zminion-pkgroot-6d43c405daafa48bb15d4e896080485cecebca44-dirty/usr/bin
cp -v zminion /tmp/zminion-pkgroot-6d43c405daafa48bb15d4e896080485cecebca44-dirty/usr/bin
'zminion' -> '/tmp/zminion-pkgroot-6d43c405daafa48bb15d4e896080485cecebca44-dirty/usr/bin/zminion'
tar cvfz /tmp/zminion-6d43c405daafa48bb15d4e896080485cecebca44-dirty.tgz -C /tmp/zminion-pkgroot-6d43c405daafa48bb15d4e896080485cecebca44-dirty/usr .
./
./bin/
./bin/zminion
chown 1000:1000 /tmp/zminion-6d43c405daafa48bb15d4e896080485cecebca44-dirty.tgz
mv /tmp/zminion-6d43c405daafa48bb15d4e896080485cecebca44-dirty.tgz .
~/src/europa/src/golang/src/github.com/zenoss/zminion
# plu@plu-9: ls -al
total 9968
drwxrwxr-x 5 plu plu 4096 Sep 4 11:49 .
drwxrwxr-x 9 plu plu 4096 Sep 4 10:32 ..
drwxrwxr-x 8 plu plu 4096 Sep 4 11:49 .git
-rw-r--r-- 1 plu plu 333 Sep 2 13:48 .gitignore
-rwxrwxr-x 1 plu plu 236 Sep 2 13:48 gitstatus.sh
drwxrwxr-x 3 plu plu 4096 Sep 4 10:52 Godeps
drwxrwxr-x 2 plu plu 4096 Sep 4 11:28 hack
-rw-rw-r-- 1 plu plu 18026 Aug 29 11:03 LICENSE
-rw-rw-r-- 1 plu plu 8788 Sep 3 13:10 main.go
-rw-rw-r-- 1 plu plu 3613 Sep 4 11:44 makefile
-rw-rw-r-- 1 plu plu 67 Aug 29 11:03 README.md
-rw-rw-r-- 1 plu plu 6 Aug 29 13:31 VERSION
-rwxr-xr-x 1 plu plu 7953720 Sep 4 11:44 zminion
-rw-r--r-- 1 plu plu 2175983 Sep 4 11:49 zminion-6d43c405daafa48bb15d4e896080485cecebca44-dirty.tgz
# plu@plu-9: tar -tzvf zminion-6d43c405daafa48bb15d4e896080485cecebca44-dirty.tgz
drwxr-xr-x root/root 0 2014-09-04 11:49 ./
drwxr-xr-x root/root 0 2014-09-04 11:49 ./bin/
-rwxr-xr-x root/root 7953720 2014-09-04 11:49 ./bin/zminion
~/src/europa/src/golang/src/github.com/zenoss/zminion
# plu@plu-9: make clean
go clean
rm -f *.deb
rm -f *.rpm
rm -f *.tgz
rm -fr /tmp/zminion-pkgroot-9d645bbd5435dd429349fb716c9b3557f07992c6-dirty
```