class Docker::Template::CLI
Public Instance Methods
build(*args)
click to toggle source
– rubocop:disable Lint/RescueException –
# File lib/docker/template/cli.rb, line 85 def build(*args) return help(__method__) if options.help? Build.new(args, options) .start rescue Docker::Template::Error::StandardError => e $stderr.puts Simple::Ansi.red(e.message) exit e.respond_to?(:status) ? \ e.status : 1 rescue Exception => _e raise unless $ERROR_POSITION $ERROR_POSITION.delete_if do |source| source =~ %r!#{Regexp.escape( __FILE__ )}!o end end
cache(*args)
click to toggle source
–
# File lib/docker/template/cli.rb, line 21 def cache(*args) return help(__method__) if options.help? self.options = options.merge(:cache => true) if options.force? self.options = options.merge(:cache_only => true) return build( *args ) end
clean(*args)
click to toggle source
–
# File lib/docker/template/cli.rb, line 38 def clean(*args) return help(__method__) if options.help? self.options = options.merge(:clean => true) if options.force? self.options = options.merge(:clean_only => true) return build( *args ) end
list()
click to toggle source
–
# File lib/docker/template/cli.rb, line 114 def list return help(__method__) if options.help? return $stdout.puts( List.build ) end
push(*args)
click to toggle source
–
# File lib/docker/template/cli.rb, line 55 def push(*args) return help(__method__) if options.help? self.options = options.merge(:push => true) if options.force? self.options = options.merge(:push_only => true) return build( *args ) end