Class: Docksync::Rsync
- Inherits:
-
Object
- Object
- Docksync::Rsync
- Defined in:
- lib/docksync/rsync.rb,
lib/docksync/rsync/sync.rb,
lib/docksync/rsync/install.rb
Defined Under Namespace
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(options) ⇒ Rsync
constructor
A new instance of Rsync.
- #run ⇒ Object
Constructor Details
#initialize(options) ⇒ Rsync
Returns a new instance of Rsync.
9 10 11 12 13 |
# File 'lib/docksync/rsync.rb', line 9 def initialize() @options = @cid = @options[:cid] @cwd = @options[:cwd] end |
Instance Method Details
#check ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/docksync/rsync.rb', line 25 def check running = `docker inspect -f {{.State.Running}} #{@cid}`.strip == 'true' unless running puts "Container #{@cid} is not running".colorize(:red) exit 0 end end |