- Install Vagrant
- Open a command prompt
- Type
vagrant plugin install vagrant-docker-composeto install the Docker Compose plugin - Copy
VagrantFileanddocker-compose.ymlfrom this Gist into a folder somewhere - Edit the path in the second to last line of the
VagrantFileto point to where you've copied it to. Use forward slashes - eg./path1/path2/etc.
- Open a command prompt
- Change directory to where you copied the files to
- Type
vagrant up - Wait for it to finish its thing (this will take longer the first time, as it has to download the Linux distro, and Docker images)
- Job done! You should now be able to connect to Redis via port 6379 on
localhost!!! :) - You can play with the various docker commands and interact with your various containers by SSHing into the Linux VM with
vagrant ssh.
- If you need to get an shell into the Linux box, you can just type
Vagrant sshin the command prompt, and this should take your straight into the Linux bash shell. If you get an error saying OpenSSL hasn't been installed, then just update yourpathenvironment variable to include your Git bin folder - something likeC:\Program Files\Git\usr\bin. Then restart your command prompt. - If you want to add other apps to the docker-compose file, also remember to open the port to your host machine by adding another
config.vm.network "forwarded_port"line to your VagrantFile in the same way as I've done for Redis.