Skip to content

Commit

Permalink
Change library used to encode manifest (appc#245).
Browse files Browse the repository at this point in the history
Manifest was encoded using official encoding/json which does not canonical encode data.
Use library from github.com/docker/go/canonical/json instead.
  • Loading branch information
gfyrag committed Jun 12, 2017
1 parent 958d403 commit 4b0111f
Show file tree
Hide file tree
Showing 12 changed files with 3,930 additions and 16 deletions.
12 changes: 8 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ import:
- specs-go
- package: github.com/opencontainers/go-digest
version: 21dfd564fd89c944783d00d069f33e3e7123c448
- package: github.com/docker/go
version: d30aec9fd63c35133f8f79c3412ad91a3b08be06
subpackages:
- canonical/json
3 changes: 2 additions & 1 deletion lib/internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import (
"github.com/appc/spec/schema"
appctypes "github.com/appc/spec/schema/types"
gzip "github.com/klauspost/pgzip"
canJson "github.com/docker/go/canonical/json"
)

// Docker2ACIBackend is the interface that abstracts converting Docker layers
Expand Down Expand Up @@ -720,7 +721,7 @@ func subtractWhiteouts(pathWhitelist []string, whiteouts []string) []string {

// WriteManifest writes a schema.ImageManifest entry on a tar.Writer.
func WriteManifest(outputWriter *tar.Writer, manifest schema.ImageManifest) error {
b, err := json.Marshal(manifest)
b, err := canJson.Marshal(manifest)
if err != nil {
return err
}
Expand Down
27 changes: 27 additions & 0 deletions vendor/github.com/docker/go/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4b0111f

Please sign in to comment.