docker save: raw json

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: d3bc787bca62edff384e06a12224be2d982353da
Component: engine
This commit is contained in:
Vincent Batts
2014-06-17 09:05:29 -04:00
parent 2219ce0d97
commit dcfc8d37e9
2 changed files with 17 additions and 2 deletions

View File

@ -1,7 +1,6 @@
package graph
import (
"encoding/json"
"io"
"github.com/dotcloud/docker/engine"
@ -136,7 +135,7 @@ func (s *TagStore) CmdLookup(job *engine.Job) engine.Status {
name := job.Args[0]
if image, err := s.LookupImage(name); err == nil && image != nil {
if job.GetenvBool("raw") {
b, err := json.Marshal(image)
b, err := image.RawJson()
if err != nil {
return job.Error(err)
}