I want to setup a development environment on windows 10. So I installed the latest vagrant 1.8.7 with vagrant-vbguest plugin for synced folders.
I Defined my Vagrantfile as:
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
# config.vm.network "forwarded_port", guest: 8080, host: 8080
config.vm.network "private_network", ip: "192.168.11.11", netmask: "255.255.255.0"
end
When I start this box and ssh into the box I disabled selinux and installed latest docker and docker-compose.
In /vagrant I added the following docker-compose.yml:
nginx:
image: nginx:latest
ports:
- 8080:80
Now when I do "docker-compose up -d", the docker machine is running fine. If I use Vagrantfile with "forwarded_port" (as commented in Vagrantfile) I can access nginx via
http://localhost:8080
It worked the first time, but when I halt or restart vagrant it doesn't work anymore. What am I doing wrong? Struggling with this for more than a day!