fsouza/go-dockerclient — pull request #64 by zyndiecate (2014-01-25 10:47:35+00:00)
Title: implemented DockerClient.BuildImage

Regarding https://github.com/fsouza/go-dockerclient/issues/18 I implemented the BuildImage method to create fully functional images using the [Docker Remote API](http://docs.docker.io/en/latest/api/docker_remote_api_v1.8/#build-an-image-from-dockerfile-via-stdin). My used Docker version is 0.7.6, build bc3b2ec.

```golang
// build image by tarball
buildImageOptions := DockerClient.BuildImageOptions{Name: "imageName", Remote: "github.com/user/repo", SuppressOutput: "1"}
err := DockerClient.BuildImage(buildImageOptions)
```

In generell it works like a charm, but there is one behaviour i don't like. In `client.stream` the progress, of uploading the tarball, is piped to `stdin`. That produces some new empty lines in terminal, e.g. having a server running. It would be cool to be able to suppress that output. Using the remote Api one would like to hide that, because it is not needed, unless I miss something.