diff --git a/paunch/builder/compose1.py b/paunch/builder/compose1.py index e26ac45..1214066 100644 --- a/paunch/builder/compose1.py +++ b/paunch/builder/compose1.py @@ -44,7 +44,7 @@ class ComposeV1Builder(base.BaseBuilder): if 'healthcheck' in cconfig: hconfig = cconfig['healthcheck'] if 'test' in hconfig: - cmd.append('--health-cmd=%s' % hconfig['test']) + cmd.append('--health-cmd="%s"' % hconfig['test']) if 'interval' in hconfig: cmd.append('--health-interval=%s' % hconfig['interval']) if 'timeout' in hconfig: diff --git a/paunch/tests/test_builder_compose1.py b/paunch/tests/test_builder_compose1.py index c470712..dc922c2 100644 --- a/paunch/tests/test_builder_compose1.py +++ b/paunch/tests/test_builder_compose1.py @@ -29,7 +29,7 @@ class TestComposeV1Builder(tbb.TestBaseBuilder): 'uts': 'host', 'restart': 'always', 'healthcheck': { - 'test': '/bin/true', + 'test': 'ls /mydir', 'interval': '30s', 'timeout': '10s', 'retries': 3 @@ -53,7 +53,7 @@ class TestComposeV1Builder(tbb.TestBaseBuilder): ['docker', 'run', '--name', 'one', '--detach=true', '--env-file=/tmp/foo.env', '--net=host', '--ipc=host', '--pid=container:bar', - '--uts=host', '--health-cmd=/bin/true', '--health-interval=30s', + '--uts=host', '--health-cmd="ls /mydir"', '--health-interval=30s', '--health-timeout=10s', '--health-retries=3', '--privileged=true', '--restart=always', '--user=bar', '--log-opt=tag={{.ImageName}}/{{.Name}}/{{.ID}}',