Add support for the --entrypoint option of docker run
Signed-off-by: Satoru Logic <satorulogic@gmail.com>
This commit is contained in:
parent
267be12bb2
commit
62b9c64311
5 changed files with 27 additions and 1 deletions
2
tests/fixtures/dockerfile_with_entrypoint/Dockerfile
vendored
Normal file
2
tests/fixtures/dockerfile_with_entrypoint/Dockerfile
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
FROM busybox:latest
|
||||
ENTRYPOINT echo "From prebuilt entrypoint"
|
||||
2
tests/fixtures/dockerfile_with_entrypoint/fig.yml
vendored
Normal file
2
tests/fixtures/dockerfile_with_entrypoint/fig.yml
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
service:
|
||||
build: tests/fixtures/dockerfile_with_entrypoint
|
||||
|
|
@ -191,6 +191,21 @@ class CLITestCase(DockerClientTestCase):
|
|||
[u'/bin/true'],
|
||||
)
|
||||
|
||||
@patch('dockerpty.start')
|
||||
def test_run_service_with_entrypoint_overridden(self, _):
|
||||
self.command.base_dir = 'tests/fixtures/dockerfile_with_entrypoint'
|
||||
name = 'service'
|
||||
self.command.dispatch(
|
||||
['run', '--entrypoint', '/bin/echo', name, 'helloworld'],
|
||||
None
|
||||
)
|
||||
service = self.project.get_service(name)
|
||||
container = service.containers(stopped=True, one_off=True)[0]
|
||||
self.assertEqual(
|
||||
container.human_readable_command,
|
||||
u'/bin/echo helloworld'
|
||||
)
|
||||
|
||||
def test_rm(self):
|
||||
service = self.project.get_service('simple')
|
||||
service.create_container()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue