// TrimBuildFilesFromExcludes removes the named Dockerfile and .dockerignore from
// the list of excluded files. The daemon will remove them from the final context
// but they must be in available in the context when passed to the API.
TrimBuildFilesFromExcludes removes the named Dockerfile and .dockerignore from
the list of excluded files. The daemon will remove them from the final context
but they must be in available in the context when passed to the API.
// TrimBuildFilesFromExcludes removes the named Dockerfile and . dockerignore from // the list of excluded files . The daemon will remove them from the final context // but they must be in available in the context when passed to the API .
func trimBuildFilesFromExcludes(excludes []string, dockerfile string, dockerfileFromStdin bool) []string {
	if keep, _ := Matches(".dockerignore", excludes); keep {
		excludes = append(excludes, "!.dockerignore")
	}
	if keep, _ := Matches(dockerfile, excludes); keep && !dockerfileFromStdin {
		excludes = append(excludes, "!"+dockerfile)
	}
	return excludes
}
func trimBuildFilesFromExcludes ( excludes [ ] string , dockerfile string , dockerfileFromStdin bool ) [ ] string { if keep , _ := Matches ( " " , excludes ) ; keep { excludes = append ( excludes , " " ) } if keep , _ := Matches ( dockerfile , excludes ) ; keep && ! dockerfileFromStdin { excludes = append ( excludes , " " + dockerfile ) } return excludes }
TrimBuildFilesFromExcludes removes the named Dockerfile and .dockerignore from
the list of excluded files.
TrimBuildFilesFromExcludes removes the named Dockerfile and . dockerignore from the list of excluded files .