Skip to content

Commit 3c79905

Browse files
authored
Merge pull request #33 from nexB/32-docker
Remove "repositories" from the Docker clue list #32
2 parents 5bd7600 + 3e65182 commit 3c79905

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4+
v21.6.10
5+
--------
6+
7+
This is a minor release with bug fixes.
8+
49
v21.6.4
510
--------
611

src/container_inspector/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ def find_format(extracted_location):
702702
- oci (which is for the OCI format)
703703
"""
704704
clue_files_by_image_format = {
705-
'docker': ('manifest.json', 'repositories',),
705+
'docker': ('manifest.json',),
706706
'oci': ('blobs', 'index.json', 'oci-layout',)
707707
}
708708

33.5 KB
Binary file not shown.

tests/test_image.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,8 @@ def test_Image_find_format(self):
140140
test_arch = self.get_test_loc('image/she-image_from_scratch-1.0.tar')
141141
test_dir = self.extract_test_tar(test_arch)
142142
assert Image.find_format(test_dir) == 'docker'
143+
144+
def test_Image_find_format_finds_Docker_images_without_repositories(self):
145+
test_arch = self.get_test_loc('image/mini-image_from_scratch-2.0.tar')
146+
test_dir = self.extract_test_tar(test_arch)
147+
assert Image.find_format(test_dir) == 'docker'

0 commit comments

Comments
 (0)