Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit 4f9b781

Browse files
Merge pull request #234 from sharifelgamal/image-metadata
do not diff image sha or hostname in metadata
2 parents a4bd726 + fb8bfd7 commit 4f9b781

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

differs/metadata_diff.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ func getMetadataList(image pkgutil.Image) ([]string, error) {
8080
}
8181
c := configFile.Config
8282
return []string{
83-
fmt.Sprintf("Hostname: %s", c.Hostname),
8483
fmt.Sprintf("Domainname: %s", c.Domainname),
8584
fmt.Sprintf("User: %s", c.User),
8685
fmt.Sprintf("AttachStdin: %t", c.AttachStdin),
@@ -93,7 +92,6 @@ func getMetadataList(image pkgutil.Image) ([]string, error) {
9392
fmt.Sprintf("Env: %s", strings.Join(c.Env, ",")),
9493
fmt.Sprintf("Cmd: %s", strings.Join(c.Cmd, ",")),
9594
fmt.Sprintf("ArgsEscaped: %t", c.ArgsEscaped),
96-
fmt.Sprintf("Image: %s", c.Image),
9795
fmt.Sprintf("Volumes: %v", pkgutil.SortMap(c.Volumes)),
9896
fmt.Sprintf("Workdir: %s", c.WorkingDir),
9997
fmt.Sprintf("Entrypoint: %s", strings.Join(c.Entrypoint, ",")),

tests/metadata_diff_expected.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@
66
"Diff": {
77
"Adds": [
88
"ExposedPorts: 1234/tcp:{}",
9-
"Image: sha256:0b30c570b95ba9cc450c8252cb264a8c66f7492a7dd6fb32f356267b9e04038f",
109
"Entrypoint: /entrypoint"
1110
],
1211
"Dels": [
1312
"ExposedPorts: 1234/tcp:{} 4321/tcp:{}",
14-
"Image: sha256:63d847f046cdda00df8ba9176753059439478784129443dd1da632504dce95bb",
1513
"Entrypoint: "
1614
]
1715
}
1816
}
19-
]
17+
]

0 commit comments

Comments
 (0)