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
ba6df5a2
Kaydet (Commit)
ba6df5a2
authored
Eyl 14, 2015
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add documentation for volume API methods
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
05267f63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
1 deletion
+66
-1
api.md
docs/api.md
+66
-1
No files found.
docs/api.md
Dosyayı görüntüle @
ba6df5a2
...
...
@@ -255,6 +255,29 @@ The utility can be used as follows:
You can now use this with 'environment' for
`create_container`
.
## create_volume
Create and register a named volume
**Params**
:
*
name (str): Name of the volume
*
driver (str): Name of the driver used to create the volume
*
driver_opts (dict): Driver options as a key-value dictionary
**Returns**
(dict): The created volume reference object
```
python
>>>
from
docker
import
Client
>>>
cli
=
Client
()
>>>
volume
=
cli
.
create_volume
(
name
=
'foobar'
,
driver
=
'local'
,
driver_opts
=
{
'foo'
:
'bar'
,
'baz'
:
'false'
}
)
>>>
print
(
volume
)
{
u'Mountpoint'
:
u'/var/lib/docker/volumes/foobar/_data'
,
u'Driver'
:
u'local'
,
u'Name'
:
u'foobar'
}
```
## diff
Inspect changes on a container's filesystem
...
...
@@ -526,6 +549,21 @@ Identical to the `docker inspect` command, but only for images
**Returns**
(dict): Nearly the same output as
`docker inspect`
, just as a
single dict
## inspect_volume
Retrieve volume info by name.
**Params**
:
*
name (str): volume name
**Returns**
(dict): Volume information dictionary
```
python
>>>
cli
.
inspect_volume
(
'foobar'
)
{
u'Mountpoint'
:
u'/var/lib/docker/volumes/foobar/_data'
,
u'Driver'
:
u'local'
,
u'Name'
:
u'foobar'
}
```
## kill
Kill a container or send a signal to a container
...
...
@@ -695,6 +733,16 @@ Remove an image. Similar to the `docker rmi` command.
*
force (bool): Force removal of the image
*
noprune (bool): Do not delete untagged parents
## remove_volume
Remove a volume. Similar to the
`docker volume rm`
command.
**Params**
:
*
name (str): The volume's name
**Returns**
(bool): True on successful removal. Failure will raise an exception.
## rename
Rename a container. Similar to the
`docker rename`
command.
...
...
@@ -851,6 +899,7 @@ Unpauses all processes within a container.
*
container (str): The container to unpause
## version
Nearly identical to the
`docker version`
command.
**Returns**
(dict): The server version information
...
...
@@ -870,6 +919,23 @@ Nearly identical to the `docker version` command.
}
```
## volumes
List volumes currently registered by the docker daemon. Similar to the
`docker volume ls`
command.
**Params**
*
filters (dict): Server-side list filtering options.
**Returns**
(dict): Dictionary with list of volume objects as value of the
`Volumes`
key.
```
python
>>>
cli
.
volumes
()
{
u'Volumes'
:
[
{
u'Mountpoint'
:
u'/var/lib/docker/volumes/foobar/_data'
,
u'Driver'
:
u'local'
,
u'Name'
:
u'foobar'
},
{
u'Mountpoint'
:
u'/var/lib/docker/volumes/baz/_data'
,
u'Driver'
:
u'local'
,
u'Name'
:
u'baz'
}
]}
```
## wait
Identical to the
`docker wait`
command. Block until a container stops, then
...
...
@@ -893,6 +959,5 @@ exception will be raised.
TODO:
*
load_image
*
resize
-->
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