diff options
Diffstat (limited to 'lib/e2e')
| -rw-r--r-- | lib/e2e/docker.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/e2e/docker.rb b/lib/e2e/docker.rb index f8347e9..5cc3df8 100644 --- a/lib/e2e/docker.rb +++ b/lib/e2e/docker.rb @@ -19,7 +19,7 @@ class Docker end end - def run(image:, project_path: Pathname.pwd, env: {}, debug: ENV.fetch('DEBUG', 'false') == 'true') + def run(image:, project_path: Pathname.pwd, env: {}, debug: ENV.fetch('DEBUG', 'false') == 'true', command: '/analyzer run') env_options = DEFAULT_ENV.merge(env).map { |(key, value)| "--env #{key}='#{value}'" } Dir.chdir pwd do arguments = [ @@ -29,11 +29,12 @@ class Docker "--network=host", "--volume=#{project_path}:/tmp/app", "--workdir=/tmp/app", - env_options + env_options, + "--entrypoint=/bin/sh" ] - arguments.push(debug ? ["-it", "--entrypoint=''", image, '/bin/sh'] : [image, '/analyzer run']) - command = expand(arguments) - system(command, exception: true) + arguments.push(debug ? ["-it", image] : [image]) + arguments.push("-c '#{command}'") + system(expand(arguments), exception: true) end end |
