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
50b391e8
Kaydet (Commit)
50b391e8
authored
Tem 16, 2013
tarafından
shin-
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Updated README
üst
5364ce74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
README.md
README.md
+17
-12
No files found.
README.md
Dosyayı görüntüle @
50b391e8
...
...
@@ -6,11 +6,14 @@ An API client for docker written in Python
API
===
`client.Client(base_url='http://localhost:4243')`
Client class.
`base_url`
refers to the protocol+hostname+port where the docker server is hosted.
`client.Client(base_url='http://localhost:4243', version="1.3")`
Client class.
`base_url`
refers to the protocol+hostname+port where the docker
server is hosted. Version is the version of the API the client will use.
*
`c.build(dockerfile)`
Identical to the
`docker build`
command.
`dockerfile`
is a file-like object or a bytes collection.
*
`c.build(path=None, tag=None, fileobj=None)`
Similar to the
`docker build`
command. Either
`path`
or
`fileobj`
needs to be
set.
`path`
can be a local path (to a directory containing a Dockerfile) or a
remote URL.
`fileobj`
must be a readable file-like object to a Dockerfile.
*
`c.commit(container, repository=None, tag=None, message=None, author=None, conf=None)`
Identical to the
`docker commit`
command.
...
...
@@ -19,8 +22,9 @@ Identical to the `docker commit` command.
Identical to the
`docker ps`
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)`
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`
)
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`
)
*
`c.diff(container)`
Identical to the
`docker diff`
command.
...
...
@@ -35,9 +39,10 @@ Identical to the `docker history` command.
Identical to the
`docker images`
command.
*
`c.import_image(src, repository=None, tag=None)`
Identical to the
`docker import`
command. If
`src`
is a string or unicode string, it will be treated as a URL
to fetch the image from. To import an image from the local machine,
`src`
needs to be a file-like object or
bytes collection.
Identical to the
`docker import`
command. If
`src`
is a string or unicode
string, it will be treated as a URL to fetch the image from. To import an image
from the local machine,
`src`
needs to be a file-like object or bytes
collection.
*
`c.info()`
Identical to the
`docker info`
command.
...
...
@@ -82,14 +87,14 @@ Identical to the `docker restart` command.
Identical to the
`docker search`
command.
*
`c.start(container)`
Identical to the
`docker start`
command, but doesn't support attach options.
Use
`docker logs`
to
recover
`stdout`
/
`stderr`
Identical to the
`docker start`
command, but doesn't support attach options.
Use
`docker logs`
to
recover
`stdout`
/
`stderr`
*
`c.start(container, binds={'/host': '/mnt'})`
Allows to bind a directory in the host to the container.
Similar to the
`docker run`
command with the
`-b="/host:/mnt"`
.
Requires the container to be created with the volumes argument:
`c.create_container(..., volumes={'/mnt': {}})`
`c.create_container(..., volumes={'/mnt': {}})`
*
`c.stop(containers..., t=10)`
Identical to the
`docker stop`
command.
...
...
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