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
1d124a12
Kaydet (Commit)
1d124a12
authored
Kas 08, 2018
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Improve ulimits documentation
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
9987c1bc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
container.py
docker/api/container.py
+1
-1
containers.py
docker/models/containers.py
+2
-2
containers.py
docker/types/containers.py
+17
-0
api.rst
docs/api.rst
+1
-0
No files found.
docker/api/container.py
Dosyayı görüntüle @
1d124a12
...
...
@@ -543,7 +543,7 @@ class ContainerApiMixin(object):
}
ulimits (:py:class:`list`): Ulimits to set inside the container,
as a list of
dict
s.
as a list of
:py:class:`docker.types.Ulimit` instance
s.
userns_mode (str): Sets the user namespace mode for the container
when user namespace remapping option is enabled. Supported
values are: ``host``
...
...
docker/models/containers.py
Dosyayı görüntüle @
1d124a12
...
...
@@ -691,8 +691,8 @@ class ContainerCollection(Collection):
}
tty (bool): Allocate a pseudo-TTY.
ulimits (:py:class:`list`): Ulimits to set inside the container,
as
a
list of dict
s.
ulimits (:py:class:`list`): Ulimits to set inside the container,
a
s a list of :py:class:`docker.types.Ulimit` instance
s.
user (str or int): Username or UID to run commands as inside the
container.
userns_mode (str): Sets the user namespace mode for the container
...
...
docker/types/containers.py
Dosyayı görüntüle @
1d124a12
...
...
@@ -58,6 +58,23 @@ class LogConfig(DictType):
class
Ulimit
(
DictType
):
"""
Create a ulimit declaration to be used with
:py:meth:`~docker.api.container.ContainerApiMixin.create_host_config`.
Args:
name (str): Which ulimit will this apply to. A list of valid names can
be found `here <http://tinyurl.me/ZWRkM2Ztwlykf>`_.
soft (int): The soft limit for this ulimit. Optional.
hard (int): The hard limit for this ulimit. Optional.
Example:
nproc_limit = docker.types.Ulimit(name='nproc', soft=1024)
hc = client.create_host_config(ulimits=[nproc_limit])
container = client.create_container('busybox', 'true', host_config=hc)
"""
def
__init__
(
self
,
**
kwargs
):
name
=
kwargs
.
get
(
'name'
,
kwargs
.
get
(
'Name'
))
soft
=
kwargs
.
get
(
'soft'
,
kwargs
.
get
(
'Soft'
))
...
...
docs/api.rst
Dosyayı görüntüle @
1d124a12
...
...
@@ -151,4 +151,5 @@ Configuration types
.. autoclass:: SwarmExternalCA
.. autoclass:: SwarmSpec(*args, **kwargs)
.. autoclass:: TaskTemplate
.. autoclass:: Ulimit
.. autoclass:: UpdateConfig
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