Example #1
0
func SaveImage(client *docker.Client, image string, w io.Writer) (err error) {
	opts := docker.ExportImageOptions{
		Name:         image,
		OutputStream: w,
	}
	if err := client.ExportImage(opts); err != nil {
		return err
	}
	return nil
}