Module: VagrantPlugins::DockerComposeProvisioner::Cap::Linux::DockerComposeUpload

Defined in:
lib/vagrant-docker-compose/cap/linux/docker_compose_upload.rb

Class Method Summary collapse

Class Method Details

.docker_compose_upload(machine, config, local_tmp_path) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/vagrant-docker-compose/cap/linux/docker_compose_upload.rb', line 6

def self.docker_compose_upload(machine, config, local_tmp_path)
  comm = machine.communicate

  remote_tmp_path = ""
  comm.execute("mktemp") do |type, data|
    if type == :stdout
      remote_tmp_path << data
    end
  end
  remote_tmp_path.strip!

  comm.upload(local_tmp_path, remote_tmp_path)

  remote_tmp_path
end