Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
docker-py
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
docker-py
Commits
759833c1
Unverified
Kaydet (Commit)
759833c1
authored
Şub 20, 2018
tarafından
Joffrey F
Kaydeden (comit)
GitHub
Şub 20, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #1919 from docker/1912-pull-sha-tag
Fix DockerClient pull bug when pulling image by digest
üst
ba0e5332
cc455d7f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
images.py
docker/models/images.py
+3
-1
models_images_test.py
tests/integration/models_images_test.py
+9
-0
No files found.
docker/models/images.py
Dosyayı görüntüle @
759833c1
...
@@ -314,7 +314,9 @@ class ImageCollection(Collection):
...
@@ -314,7 +314,9 @@ class ImageCollection(Collection):
self
.
client
.
api
.
pull
(
repository
,
tag
=
tag
,
**
kwargs
)
self
.
client
.
api
.
pull
(
repository
,
tag
=
tag
,
**
kwargs
)
if
tag
:
if
tag
:
return
self
.
get
(
'{0}:{1}'
.
format
(
repository
,
tag
))
return
self
.
get
(
'{0}{2}{1}'
.
format
(
repository
,
tag
,
'@'
if
tag
.
startswith
(
'sha256:'
)
else
':'
))
return
self
.
list
(
repository
)
return
self
.
list
(
repository
)
def
push
(
self
,
repository
,
tag
=
None
,
**
kwargs
):
def
push
(
self
,
repository
,
tag
=
None
,
**
kwargs
):
...
...
tests/integration/models_images_test.py
Dosyayı görüntüle @
759833c1
...
@@ -74,6 +74,15 @@ class ImageCollectionTest(BaseIntegrationTest):
...
@@ -74,6 +74,15 @@ class ImageCollectionTest(BaseIntegrationTest):
image
=
client
.
images
.
pull
(
'alpine'
,
tag
=
'3.3'
)
image
=
client
.
images
.
pull
(
'alpine'
,
tag
=
'3.3'
)
assert
'alpine:3.3'
in
image
.
attrs
[
'RepoTags'
]
assert
'alpine:3.3'
in
image
.
attrs
[
'RepoTags'
]
def
test_pull_with_sha
(
self
):
image_ref
=
(
'hello-world@sha256:083de497cff944f969d8499ab94f07134c50bcf5e6b95'
'59b27182d3fa80ce3f7'
)
client
=
docker
.
from_env
(
version
=
TEST_API_VERSION
)
image
=
client
.
images
.
pull
(
image_ref
)
assert
image_ref
in
image
.
attrs
[
'RepoDigests'
]
def
test_pull_multiple
(
self
):
def
test_pull_multiple
(
self
):
client
=
docker
.
from_env
(
version
=
TEST_API_VERSION
)
client
=
docker
.
from_env
(
version
=
TEST_API_VERSION
)
images
=
client
.
images
.
pull
(
'hello-world'
)
images
=
client
.
images
.
pull
(
'hello-world'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment