Try to run bootstrap file on docker container via vagrant

57 views
Skip to first unread message

John Doe

unread,
Jan 19, 2017, 5:11:31 AM1/19/17
to Vagrant
Hey,

I'm very new to this vagrant/docker thing and what I'm trying to achieve is run a file inside docker container through vagrant.


Can someone please a have and tell me what I'm doing wrong ? Do I need sshd running inside docker container in order for vagrant to connect or there is no reason for that ? What would be the best practise for me to achieve my goal ?

Thanks

Alvaro Miranda Aguilera

unread,
Jan 19, 2017, 12:41:17 PM1/19/17
to vagra...@googlegroups.com
if your image test doesn't have ssh running, the provision wont work.

now, there is the idea that container shouldn't have ssh, so not sure whats the recommendation here.

Can you run this?

Vagrant.configure("2") do |config|
  config.vm.provider "docker" do |d|
    d.image = "hello-world"
    d.remains_running = false
  end
end


If this works, vagrant is running fine.


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/9a578654-fc65-4db0-bfe1-22a6e74bf5b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages