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
b46e4a39
Kaydet (Commit)
b46e4a39
authored
Nis 22, 2015
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Modify expand_registry_url to support v2 private registries.
üst
6dd45d75
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
auth.py
docker/auth/auth.py
+1
-1
__init__.py
docker/utils/__init__.py
+2
-2
utils.py
docker/utils/utils.py
+4
-0
No files found.
docker/auth/auth.py
Dosyayı görüntüle @
b46e4a39
...
...
@@ -29,7 +29,7 @@ DOCKER_CONFIG_FILENAME = '.dockercfg'
def
expand_registry_url
(
hostname
,
insecure
=
False
):
if
hostname
.
startswith
(
'http:'
)
or
hostname
.
startswith
(
'https:'
):
return
hostname
if
utils
.
ping
(
'https://'
+
hostname
+
'/v1/_ping'
):
if
utils
.
ping
_registry
(
'https://'
+
hostname
):
return
'https://'
+
hostname
elif
insecure
:
return
'http://'
+
hostname
...
...
docker/utils/__init__.py
Dosyayı görüntüle @
b46e4a39
from
.utils
import
(
compare_version
,
convert_port_bindings
,
convert_volume_binds
,
mkbuildcontext
,
ping
,
tar
,
parse_repository_tag
,
parse_host
,
mkbuildcontext
,
tar
,
parse_repository_tag
,
parse_host
,
kwargs_from_env
,
convert_filters
,
create_host_config
,
create_container_config
,
parse_bytes
create_container_config
,
parse_bytes
,
ping_registry
)
# flake8: noqa
docker/utils/utils.py
Dosyayı görüntüle @
b46e4a39
...
...
@@ -118,6 +118,10 @@ def compare_version(v1, v2):
return
1
def
ping_registry
(
url
):
return
ping
(
url
+
'/v2/_ping'
)
or
ping
(
url
+
'/v1/_ping'
)
def
ping
(
url
):
try
:
res
=
requests
.
get
(
url
,
timeout
=
3
)
...
...
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