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
f3dbd017
Kaydet (Commit)
f3dbd017
authored
Kas 20, 2017
tarafından
Damien Nadé
Kaydeden (comit)
Damien Nadé
Kas 21, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix for #1815: make APIClient.stop honor container StopTimeout value
Signed-off-by:
Damien Nadé
<
anvil.github@livna.org
>
üst
1d6b5b20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
container.py
docker/api/container.py
+9
-3
No files found.
docker/api/container.py
Dosyayı görüntüle @
f3dbd017
...
@@ -1112,20 +1112,26 @@ class ContainerApiMixin(object):
...
@@ -1112,20 +1112,26 @@ class ContainerApiMixin(object):
json
=
True
)
json
=
True
)
@utils.check_resource
(
'container'
)
@utils.check_resource
(
'container'
)
def
stop
(
self
,
container
,
timeout
=
10
):
def
stop
(
self
,
container
,
timeout
=
None
):
"""
"""
Stops a container. Similar to the ``docker stop`` command.
Stops a container. Similar to the ``docker stop`` command.
Args:
Args:
container (str): The container to stop
container (str): The container to stop
timeout (int): Timeout in seconds to wait for the container to
timeout (int): Timeout in seconds to wait for the container to
stop before sending a ``SIGKILL``. Default: 10
stop before sending a ``SIGKILL``. If None, then the
StopTimeout value of the container will be used.
Default: None
Raises:
Raises:
:py:class:`docker.errors.APIError`
:py:class:`docker.errors.APIError`
If the server returns an error.
If the server returns an error.
"""
"""
params
=
{
't'
:
timeout
}
if
timeout
is
None
:
params
=
{}
timeout
=
10
else
:
params
=
{
't'
:
timeout
}
url
=
self
.
_url
(
"/containers/{0}/stop"
,
container
)
url
=
self
.
_url
(
"/containers/{0}/stop"
,
container
)
res
=
self
.
_post
(
url
,
params
=
params
,
res
=
self
.
_post
(
url
,
params
=
params
,
...
...
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