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
d4345b58
Kaydet (Commit)
d4345b58
authored
Tem 10, 2018
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add credHelpers support to set_auth_headers in build
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
f71d1cf3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
build.py
docker/api/build.py
+12
-4
No files found.
docker/api/build.py
Dosyayı görüntüle @
d4345b58
...
...
@@ -293,20 +293,28 @@ class BuildApiMixin(object):
# Send the full auth configuration (if any exists), since the build
# could use any (or all) of the registries.
if
self
.
_auth_configs
:
auth_cfgs
=
self
.
_auth_configs
auth_data
=
{}
if
self
.
_auth_confi
gs
.
get
(
'credsStore'
):
if
auth_cf
gs
.
get
(
'credsStore'
):
# Using a credentials store, we need to retrieve the
# credentials for each registry listed in the config.json file
# Matches CLI behavior: https://github.com/docker/docker/blob/
# 67b85f9d26f1b0b2b240f2d794748fac0f45243c/cliconfig/
# credentials/native_store.go#L68-L83
for
registry
in
self
.
_auth_confi
gs
.
get
(
'auths'
,
{})
.
keys
():
for
registry
in
auth_cf
gs
.
get
(
'auths'
,
{})
.
keys
():
auth_data
[
registry
]
=
auth
.
resolve_authconfig
(
self
.
_auth_confi
gs
,
registry
,
auth_cf
gs
,
registry
,
credstore_env
=
self
.
credstore_env
,
)
else
:
auth_data
=
self
.
_auth_configs
.
get
(
'auths'
,
{})
.
copy
()
for
registry
in
auth_cfgs
.
get
(
'credHelpers'
,
{})
.
keys
():
auth_data
[
registry
]
=
auth
.
resolve_authconfig
(
auth_cfgs
,
registry
,
credstore_env
=
self
.
credstore_env
)
for
registry
,
creds
in
auth_cfgs
.
get
(
'auths'
,
{})
.
items
():
if
registry
not
in
auth_data
:
auth_data
[
registry
]
=
creds
# See https://github.com/docker/docker-py/issues/1683
if
auth
.
INDEX_NAME
in
auth_data
:
auth_data
[
auth
.
INDEX_URL
]
=
auth_data
[
auth
.
INDEX_NAME
]
...
...
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