Merge pull request #166 from cold147/hosts-on-docker
fix: move hosts file inside the docker container #136
This commit is contained in:
commit
a5f69d8e15
|
@ -38,6 +38,8 @@ module VagrantPlugins
|
||||||
machine.communicate.upload(file, '/tmp/hosts')
|
machine.communicate.upload(file, '/tmp/hosts')
|
||||||
if windir
|
if windir
|
||||||
machine.communicate.sudo("#{move_cmd} /tmp/hosts/hosts.#{machine.name} #{realhostfile}")
|
machine.communicate.sudo("#{move_cmd} /tmp/hosts/hosts.#{machine.name} #{realhostfile}")
|
||||||
|
elsif machine.communicate.test('test -f /.dockerinit')
|
||||||
|
machine.communicate.sudo("cat /tmp/hosts > #{realhostfile}")
|
||||||
else
|
else
|
||||||
machine.communicate.sudo("#{move_cmd} /tmp/hosts #{realhostfile}")
|
machine.communicate.sudo("#{move_cmd} /tmp/hosts #{realhostfile}")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue