Class: Ufo::Docker

Inherits:
Thor
  • Object
show all
Defined in:
lib/ufo/cli.rb

Instance Method Summary collapse

Instance Method Details

#baseObject



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/ufo/cli.rb', line 18

def base
  builder = DockerBuilder.new(options.dup.merge(
    image_namespace: "base",
    dockerfile: "Dockerfile.base"
  ))
  builder.build
  builder.push if options[:push]
  builder.update_dockerfile
  DockerCleaner.new(builder.image_name, options.merge(tag_prefix: "base")).cleanup
  EcrCleaner.new(builder.image_name, options.merge(tag_prefix: "base")).cleanup
end

#buildObject



9
10
11
12
13
# File 'lib/ufo/cli.rb', line 9

def build
  builder = DockerBuilder.new(options)
  builder.build
  builder.push if options[:push]
end

#cleanup(image_name) ⇒ Object



42
43
44
# File 'lib/ufo/cli.rb', line 42

def cleanup(image_name)
  DockerCleaner.new(image_name, options).cleanup
end

#image_nameObject



33
34
35
36
# File 'lib/ufo/cli.rb', line 33

def image_name
  full_image_name = DockerBuilder.new(options).full_image_name
  puts full_image_name
end