Reproducible build support docker image (#8039)

when build docker image, we need a base image. now base image is specified by tag. we can use sha256 to specify docker image.
This commit is contained in:
Shilong Liu
2021-07-09 14:30:26 +08:00
committed by GitHub
parent 70c619c9b6
commit 4b3b4c0ce1
3 changed files with 48 additions and 1 deletions

View File

@@ -374,10 +374,12 @@ class VersionBuild:
def load_from_target(self):
dockers_path = os.path.join(self.target_path, 'versions/dockers')
build_path = os.path.join(self.target_path, 'versions/build')
default_path = os.path.join(self.target_path, 'versions/default')
modules = {}
self.modules = modules
file_paths = glob.glob(dockers_path + '/*')
file_paths += glob.glob(build_path + '/build-*')
file_paths += glob.glob(default_path)
file_paths.append(os.path.join(self.target_path, 'versions/host-image'))
file_paths.append(os.path.join(self.target_path, 'versions/host-base-image'))
for file_path in file_paths: