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
07d791d5
Kaydet (Commit)
07d791d5
authored
Eki 14, 2013
tarafından
shin-
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved docstrings into README.md for consistency.
üst
cf46c4d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
23 deletions
+4
-23
README.md
README.md
+4
-3
client.py
docker/client.py
+0
-20
No files found.
README.md
Dosyayı görüntüle @
07d791d5
...
...
@@ -27,7 +27,8 @@ Identical to the `docker cp` command.
*
`c.create_container(image, command, hostname=None, user=None, detach=False, stdin_open=False, tty=False, mem_limit=0, ports=None, environment=None, dns=None, volumes=None, volumes_from=None, privileged=False)`
Creates a container that can then be
`start`
ed. Parameters are similar to those
for the
`docker run`
command except it doesn't support the attach options
(
`-a`
)
(
`-a`
)
In order to create volumes that can be rebinded at start time, use the following syntax:
`volumes={"/srv": "" }`
*
`c.diff(container)`
Identical to the
`docker diff`
command.
...
...
@@ -96,8 +97,8 @@ Similar to the `docker start` command, but doesn't support attach options.
Use
`docker logs`
to recover
`stdout`
/
`stderr`
`binds`
Allows to bind a directory in the host to the container.
Similar to the
`docker run`
command with option
`-v="/host:/mnt"`
.
Requires the container to be created with the volumes argument:
`c.create_container(..., volumes={'/mnt': {}})
`
Note that you must declare "blank" volumes at container creation to use binds.
Example of binds mapping from host to container:
`{'/mnt/srv/': '/srv'}
`
`lxc_conf`
allows to pass LXC configuration options in dict form.
*
`c.stop(container, timeout=10)`
...
...
docker/client.py
Dosyayı görüntüle @
07d791d5
...
...
@@ -231,14 +231,7 @@ class Client(requests.Session):
detach
=
False
,
stdin_open
=
False
,
tty
=
False
,
mem_limit
=
0
,
ports
=
None
,
environment
=
None
,
dns
=
None
,
volumes
=
None
,
volumes_from
=
None
,
privileged
=
False
):
'''
NOTES:
- To create modifiable volumes at start time, use::
volumes={"/srv": "" }
'''
config
=
self
.
_container_config
(
image
,
command
,
hostname
,
user
,
detach
,
stdin_open
,
tty
,
mem_limit
,
ports
,
environment
,
dns
,
...
...
@@ -287,9 +280,6 @@ class Client(requests.Session):
return
res
def
import_image
(
self
,
src
,
data
=
None
,
repository
=
None
,
tag
=
None
):
'''
To import from a local tarball, use the absolute path to the file
'''
u
=
self
.
_url
(
"/images/create"
)
params
=
{
'repo'
:
repository
,
...
...
@@ -444,16 +434,6 @@ class Client(requests.Session):
params
=
{
'term'
:
term
}),
True
)
def
start
(
self
,
container
,
binds
=
None
,
lxc_conf
=
None
):
'''
NOTES:
- Remember that you must declare "blank" volumes
at container creation to use binds
- An example of binds mapping from host to container::
{'/mnt/srv/': '/srv'}
'''
if
isinstance
(
container
,
dict
):
container
=
container
.
get
(
'Id'
)
start_config
=
{
...
...
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