lib/lint_trap/container/docker.rb in lint_trap-0.0.13 vs lib/lint_trap/container/docker.rb in lint_trap-0.0.14

- old
+ new

@@ -40,20 +40,28 @@ CODE_PATH.join(relative_path).to_s end private + def default_options + {remove_container: true} + end + def flags - [ + flags = [ # '-m', '50m', # memory # '-c', '1', # number of cpus '--net="none"', '--privileged=false', '-v', "#{LOCAL_CONFIG_PATH}:#{CONFIG_PATH}", '-v', "#{repo_path}:#{CODE_PATH}", "--workdir=#{CODE_PATH}", '--user=lint_trap' - ].join(' ') + ] + + flags.unshift('--rm') if options[:remove_container] + + flags.join(' ') end end end end