Merge pull request #16 from tonistiigi/change-dump-to-json
buildctl: use json for debuggingdocker-18.09
commit
d3b68425cd
|
@ -1,11 +1,10 @@
|
||||||
package debug
|
package debug
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
digest "github.com/opencontainers/go-digest"
|
digest "github.com/opencontainers/go-digest"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/tonistiigi/buildkit_poc/client/llb"
|
"github.com/tonistiigi/buildkit_poc/client/llb"
|
||||||
|
@ -24,7 +23,12 @@ func dumpLLB(clicontext *cli.Context) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
log.Print(spew.Sdump(ops))
|
enc := json.NewEncoder(os.Stdout)
|
||||||
|
for _, op := range ops {
|
||||||
|
if err := enc.Encode(op); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue