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
6bafac05
Kaydet (Commit)
6bafac05
authored
Mar 23, 2016
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge branch 'dimaspivak-master'
üst
14cc5806
cf831198
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
container.py
docker/api/container.py
+3
-2
api.md
docs/api.md
+1
-0
image_test.py
tests/integration/image_test.py
+14
-0
image_test.py
tests/unit/image_test.py
+2
-1
No files found.
docker/api/container.py
Dosyayı görüntüle @
6bafac05
...
@@ -40,13 +40,14 @@ class ContainerApiMixin(object):
...
@@ -40,13 +40,14 @@ class ContainerApiMixin(object):
@utils.check_resource
@utils.check_resource
def
commit
(
self
,
container
,
repository
=
None
,
tag
=
None
,
message
=
None
,
def
commit
(
self
,
container
,
repository
=
None
,
tag
=
None
,
message
=
None
,
author
=
None
,
conf
=
None
):
author
=
None
,
c
hanges
=
None
,
c
onf
=
None
):
params
=
{
params
=
{
'container'
:
container
,
'container'
:
container
,
'repo'
:
repository
,
'repo'
:
repository
,
'tag'
:
tag
,
'tag'
:
tag
,
'comment'
:
message
,
'comment'
:
message
,
'author'
:
author
'author'
:
author
,
'changes'
:
changes
}
}
u
=
self
.
_url
(
"/commit"
)
u
=
self
.
_url
(
"/commit"
)
return
self
.
_result
(
self
.
_post_json
(
u
,
data
=
conf
,
params
=
params
),
return
self
.
_result
(
self
.
_post_json
(
u
,
data
=
conf
,
params
=
params
),
...
...
docs/api.md
Dosyayı görüntüle @
6bafac05
...
@@ -123,6 +123,7 @@ Identical to the `docker commit` command.
...
@@ -123,6 +123,7 @@ Identical to the `docker commit` command.
*
tag (str): The tag to push
*
tag (str): The tag to push
*
message (str): A commit message
*
message (str): A commit message
*
author (str): The name of the author
*
author (str): The name of the author
*
changes (str): Dockerfile instructions to apply while committing
*
conf (dict): The configuration for the container. See the
[
Docker remote api
](
*
conf (dict): The configuration for the container. See the
[
Docker remote api
](
https://docs.docker.com/reference/api/docker_remote_api/
)
for full details.
https://docs.docker.com/reference/api/docker_remote_api/
)
for full details.
...
...
tests/integration/image_test.py
Dosyayı görüntüle @
6bafac05
...
@@ -90,6 +90,20 @@ class CommitTest(helpers.BaseTestCase):
...
@@ -90,6 +90,20 @@ class CommitTest(helpers.BaseTestCase):
self
.
assertIn
(
'Parent'
,
img
)
self
.
assertIn
(
'Parent'
,
img
)
self
.
assertEqual
(
img
[
'Parent'
],
busybox_id
)
self
.
assertEqual
(
img
[
'Parent'
],
busybox_id
)
def
test_commit_with_changes
(
self
):
cid
=
self
.
client
.
create_container
(
BUSYBOX
,
[
'touch'
,
'/test'
])
self
.
tmp_containers
.
append
(
cid
)
self
.
client
.
start
(
cid
)
img_id
=
self
.
client
.
commit
(
cid
,
changes
=
[
'EXPOSE 8000'
,
'CMD ["bash"]'
]
)
self
.
tmp_imgs
.
append
(
img_id
)
img
=
self
.
client
.
inspect_image
(
img_id
)
assert
'Container'
in
img
assert
img
[
'Container'
]
.
startswith
(
cid
[
'Id'
])
assert
'8000/tcp'
in
img
[
'Config'
][
'ExposedPorts'
]
assert
img
[
'Config'
][
'Cmd'
]
==
[
'bash'
]
class
RemoveImageTest
(
helpers
.
BaseTestCase
):
class
RemoveImageTest
(
helpers
.
BaseTestCase
):
def
test_remove
(
self
):
def
test_remove
(
self
):
...
...
tests/unit/image_test.py
Dosyayı görüntüle @
6bafac05
...
@@ -101,7 +101,8 @@ class ImageTest(DockerClientTest):
...
@@ -101,7 +101,8 @@ class ImageTest(DockerClientTest):
'comment'
:
None
,
'comment'
:
None
,
'tag'
:
None
,
'tag'
:
None
,
'container'
:
'3cc2351ab11b'
,
'container'
:
'3cc2351ab11b'
,
'author'
:
None
'author'
:
None
,
'changes'
:
None
},
},
timeout
=
DEFAULT_TIMEOUT_SECONDS
timeout
=
DEFAULT_TIMEOUT_SECONDS
)
)
...
...
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