Class: VagrantPlugins::DockerComposeProvisioner::DockerCompose
- Inherits:
-
Object
- Object
- VagrantPlugins::DockerComposeProvisioner::DockerCompose
- Defined in:
- lib/vagrant-docker-compose/docker_compose.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(machine, config) ⇒ DockerCompose
constructor
A new instance of DockerCompose.
- #rm ⇒ Object
- #up ⇒ Object
Constructor Details
#initialize(machine, config) ⇒ DockerCompose
Returns a new instance of DockerCompose.
6 7 8 9 |
# File 'lib/vagrant-docker-compose/docker_compose.rb', line 6 def initialize(machine, config) @machine = machine @config = config end |
Instance Method Details
#build ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/vagrant-docker-compose/docker_compose.rb', line 11 def build @machine.ui.detail(I18n.t(:docker_compose_build)) @machine.communicate.tap do |comm| comm.sudo("#{@config.env_s} #{@config.executable_install_path} #{@config.} #{} build #{@config.[:build]}") do |type, data| handle_comm(type, data) end end end |
#rm ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/vagrant-docker-compose/docker_compose.rb', line 20 def rm @machine.ui.detail(I18n.t(:docker_compose_rm)) @machine.communicate.tap do |comm| comm.sudo("#{@config.env_s} #{@config.executable_install_path} #{@config.} #{} rm #{@config.[:rm]}") do |type, data| handle_comm(type, data) end end end |
#up ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/vagrant-docker-compose/docker_compose.rb', line 29 def up @machine.ui.detail(I18n.t(:docker_compose_up)) @machine.communicate.tap do |comm| comm.sudo("#{@config.env_s} #{@config.executable_install_path} #{@config.} #{} up #{@config.[:up]}") do |type, data| handle_comm(type, data) end end end |