Class: DockerComposeDeploy::Actions::Image
- Inherits:
-
Struct
- Object
- Struct
- DockerComposeDeploy::Actions::Image
- Defined in:
- lib/docker_compose_deploy/actions/image.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#shell ⇒ Object
Returns the value of attribute shell.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/docker_compose_deploy/actions/image.rb', line 6 def name @name end |
#shell ⇒ Object
Returns the value of attribute shell
6 7 8 |
# File 'lib/docker_compose_deploy/actions/image.rb', line 6 def shell @shell end |
Instance Method Details
#push ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/docker_compose_deploy/actions/image.rb', line 8 def push shell.notify "Pushing #{name} to remote" shell.run!("docker save #{name} > #{tmp_file_path}") shell.run!("bzip2 #{tmp_file_path}") shell.scp!("#{tmp_file_path}.bz2", "#{connection}:/tmp/") shell.run!("rm #{tmp_file_path}.bz2") shell.ssh!("docker load -i /tmp/#{filename}.bz2") shell.notify "success" end |