Class: Kubes::Docker::Args::Default
- Inherits:
-
Object
- Object
- Kubes::Docker::Args::Default
- Defined in:
- lib/kubes/docker/args/default.rb
Instance Method Summary collapse
- #args ⇒ Object
- #build_args ⇒ Object
-
#initialize(name, image_name, options = {}) ⇒ Default
constructor
A new instance of Default.
Constructor Details
#initialize(name, image_name, options = {}) ⇒ Default
Returns a new instance of Default.
3 4 5 6 |
# File 'lib/kubes/docker/args/default.rb', line 3 def initialize(name, image_name, ={}) @name, @image_name, @options = name.to_s, image_name, @dockerfile = "Dockerfile" end |
Instance Method Details
#args ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/kubes/docker/args/default.rb', line 8 def args case @name when "build" build_args when "push" [@image_name] else [] end end |
#build_args ⇒ Object
19 20 21 |
# File 'lib/kubes/docker/args/default.rb', line 19 def build_args ["-t #{@image_name} -f #{@dockerfile} ."] end |