Class: Dapp::CLI::Build

Inherits:
Base
  • Object
show all
Includes:
Helper::Shellout
Defined in:
lib/dapp/cli/build.rb

Overview

CLI build subcommand

Instance Method Summary collapse

Methods included from Helper::Shellout

included, #shellout, #shellout!, #shellout_pack

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Dapp::CLI::Base

Instance Method Details

#run(*args) ⇒ Object



48
49
50
51
52
53
54
55
# File 'lib/dapp/cli/build.rb', line 48

def run(*args)
  super
rescue Exception::IntrospectImage => e
  $stderr.puts(e.net_status[:message])
  data = e.net_status[:data]
  system("docker run -ti --rm #{data[:options]} #{data[:built_id]} bash")
  shellout("docker rmi #{data[:built_id]}") if data[:rmi]
end