Skip to content

Commit

Permalink
add makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
bamarni committed Mar 19, 2016
1 parent 111441e commit f86121e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dev:
tmuxinator start go

release:
mkdir -p build
GOOS=darwin GOARCH=amd64 go build -o build/docker-machine-dns-darwin-x64 ./docker-machine-dns.go
GOOS=linux GOARCH=amd64 go build -o build/docker-machine-dns-linux-x64 ./docker-machine-dns.go

4 changes: 2 additions & 2 deletions docker-machine-dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func lookup(w dns.ResponseWriter, r *dns.Msg) {
}

if err != nil {
log.Printf("No IP found for machine '%s'", machine)
log.Printf("No IP found for machine '%s': %s", machine, err)
continue
}
ip := string(stdoutBytes[:len(stdoutBytes)-1])
Expand Down Expand Up @@ -85,7 +85,7 @@ func main() {
dns.HandleFunc("docker.", lookup)

log.Printf("Listening on %s...", addr)
go server.ListenAndServe()
go log.Fatal(server.ListenAndServe())

sig := make(chan os.Signal, 1)
signal.Notify(sig, os.Interrupt, os.Kill)
Expand Down

0 comments on commit f86121e

Please sign in to comment.