Class: KuberKit::Shell::DockerCommands
- Defined in:
- lib/kuber_kit/shell/docker_commands.rb
Instance Method Summary collapse
- #build(shell, build_dir, args = []) ⇒ Object
- #push(shell, tag_name) ⇒ Object
- #tag(shell, image_name, tag_name) ⇒ Object
Instance Method Details
#build(shell, build_dir, args = []) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/kuber_kit/shell/docker_commands.rb', line 2 def build(shell, build_dir, args = []) default_args = ["--rm=true"] args_list = (default_args + args).join(" ") shell.exec!(%Q{docker build #{build_dir} #{args_list}}) end |
#push(shell, tag_name) ⇒ Object
13 14 15 |
# File 'lib/kuber_kit/shell/docker_commands.rb', line 13 def push(shell, tag_name) shell.exec!(%Q{docker push #{tag_name}}) end |
#tag(shell, image_name, tag_name) ⇒ Object
9 10 11 |
# File 'lib/kuber_kit/shell/docker_commands.rb', line 9 def tag(shell, image_name, tag_name) shell.exec!(%Q{docker tag #{image_name} #{tag_name}}) end |