Module: Dapp::Dimg::Dapp::Command::Stages::FlushRepo

Included in:
Dapp
Defined in:
lib/dapp/dimg/dapp/command/stages/flush_repo.rb

Instance Method Summary collapse

Instance Method Details

#stages_flush_repo(repo) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/dapp/dimg/dapp/command/stages/flush_repo.rb', line 7

def stages_flush_repo(repo)
  lock_repo(repo) do
    log_step_with_indent(repo) do
      registry = registry(repo)
      repo_dimgs, repo_stages = repo_dimgs_and_cache(registry)
      repo_dimgs.merge(repo_stages).keys.each { |image_tag| delete_repo_image(registry, image_tag) }
    end
  end
end