Class: Dash::Dockerfile::Rules::CopyBeforeInstall

Inherits:
Base
  • Object
show all
Defined in:
lib/dash/dockerfile/rules/copy_before_install.rb

Overview

The single most expensive Dockerfile mistake: copying the whole tree before installing dependencies, so every commit — a README typo included — reinstalls them.

Constant Summary collapse

SUGGESTION =
"copy the dependency manifests first (Gemfile, package.json, lockfiles), install, then copy the rest of the tree"

Instance Method Summary collapse

Instance Method Details

#findings ⇒ Object



6
7
8
# File 'lib/dash/dockerfile/rules/copy_before_install.rb', line 6

def findings
  document.stages.filter_map { |stage| finding_for(stage) }
end