Browse Source

Remove service.Build and service.PullPolicy fields when generating the config hash

Signed-off-by: aiordache <[email protected]>
aiordache 4 years ago
parent
commit
44d2b29d0f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      utils/hash.go

+ 3 - 0
utils/hash.go

@@ -26,6 +26,9 @@ import (
 // ServiceHash compute configuration has for a service
 // TODO move this to compose-go
 func ServiceHash(o types.ServiceConfig) (string, error) {
+	// remove the Build config when generating the service hash
+	o.Build = nil
+	o.PullPolicy = ""
 	bytes, err := json.Marshal(o)
 	if err != nil {
 		return "", err