diff --git a/infraboxcli/run.py b/infraboxcli/run.py index c5bdaf9..bd4b1e3 100644 --- a/infraboxcli/run.py +++ b/infraboxcli/run.py @@ -321,6 +321,9 @@ def run_container(args, job, image_name): for name, path in job['directories'].items(): cmd += ['-v', '%s:/infrabox/%s' % (path, name)] + if 'entrypoint' in job: + cmd += ['--entrypoint', job['entrypoint']] + if 'environment' in job: for name, value in job['environment'].items(): if isinstance(value, dict): diff --git a/pyinfrabox/infrabox/__init__.py b/pyinfrabox/infrabox/__init__.py index 2cf4f31..eef2b73 100644 --- a/pyinfrabox/infrabox/__init__.py +++ b/pyinfrabox/infrabox/__init__.py @@ -202,8 +202,8 @@ def parse_resources(d, path): def parse_docker_image(d, path): check_allowed_properties(d, path, ("type", "name", "image", "depends_on", "resources", "environment", "timeout", "security_context", - "build_context", "cache", "repository", "command", - "deployments", "run", + "build_context", "cache", "repository", "entrypoint", + "command", "deployments", "run", "cluster", "registries", "services")) check_required_properties(d, path, ("type", "name", "image", "resources")) check_name(d['name'], path + ".name") @@ -216,6 +216,9 @@ def parse_docker_image(d, path): if 'cluster' in d: parse_cluster(d['cluster'], path + ".cluster") + if 'entrypoint' in d: + check_text(d['entrypoint'], path + ".entrypoint") + if 'command' in d: check_string_array(d['command'], path + ".command")