Merge pull request #1579 from aiordache/build_fields

Remove service.Build and service.PullPolicy from config hash
This commit is contained in:
Nicolas De loof 2021-04-22 15:46:10 +02:00 committed by GitHub
commit 92920a03e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,9 @@ import (
// ServiceHash compute configuration has for a service // ServiceHash compute configuration has for a service
// TODO move this to compose-go // TODO move this to compose-go
func ServiceHash(o types.ServiceConfig) (string, error) { 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) bytes, err := json.Marshal(o)
if err != nil { if err != nil {
return "", err return "", err