MCPcopy Index your code
hub / github.com/docker/docker-py / test_commit_with_changes

Method test_commit_with_changes

tests/integration/api_image_test.py:91–101  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

89 assert img['Parent'] == busybox_id
90
91 def test_commit_with_changes(self):
92 cid = self.client.create_container(TEST_IMG, ['touch', '/test'])
93 self.tmp_containers.append(cid)
94 self.client.start(cid)
95 img_id = self.client.commit(
96 cid, changes=['EXPOSE 8000', 'CMD ["bash"]']
97 )
98 self.tmp_imgs.append(img_id)
99 img = self.client.inspect_image(img_id)
100 assert '8000/tcp' in img['Config']['ExposedPorts']
101 assert img['Config']['Cmd'] == ['bash']
102
103
104class RemoveImageTest(BaseAPIIntegrationTest):

Callers

nothing calls this directly

Calls 4

create_containerMethod · 0.80
inspect_imageMethod · 0.80
startMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected