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
29c67c3a
Kaydet (Commit)
29c67c3a
authored
Ara 18, 2014
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added support for extra_hosts in create_host_config
üst
f2ad888e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
utils.py
docker/utils/utils.py
+11
-1
No files found.
docker/utils/utils.py
Dosyayı görüntüle @
29c67c3a
...
@@ -300,7 +300,8 @@ def create_host_config(
...
@@ -300,7 +300,8 @@ def create_host_config(
binds
=
None
,
port_bindings
=
None
,
lxc_conf
=
None
,
binds
=
None
,
port_bindings
=
None
,
lxc_conf
=
None
,
publish_all_ports
=
False
,
links
=
None
,
privileged
=
False
,
publish_all_ports
=
False
,
links
=
None
,
privileged
=
False
,
dns
=
None
,
dns_search
=
None
,
volumes_from
=
None
,
network_mode
=
None
,
dns
=
None
,
dns_search
=
None
,
volumes_from
=
None
,
network_mode
=
None
,
restart_policy
=
None
,
cap_add
=
None
,
cap_drop
=
None
,
devices
=
None
restart_policy
=
None
,
cap_add
=
None
,
cap_drop
=
None
,
devices
=
None
,
extra_hosts
=
None
):
):
host_config
=
{
host_config
=
{
'Privileged'
:
privileged
,
'Privileged'
:
privileged
,
...
@@ -341,6 +342,15 @@ def create_host_config(
...
@@ -341,6 +342,15 @@ def create_host_config(
port_bindings
port_bindings
)
)
if
extra_hosts
:
if
isinstance
(
extra_hosts
,
dict
):
extra_hosts
=
[
'{0}:{1}'
.
format
(
k
,
v
)
for
k
,
v
in
sorted
(
six
.
iteritems
(
extra_hosts
))
]
host_config
[
'ExtraHosts'
]
=
extra_hosts
host_config
[
'PublishAllPorts'
]
=
publish_all_ports
host_config
[
'PublishAllPorts'
]
=
publish_all_ports
if
links
:
if
links
:
...
...
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