Moving from Vagrant to Vagrant with Docker

I currently use a local dev setup with Vagrant to manage my vm’s per platform. so I have a vm/vagrantfile for wordpress, laravel, static sites etc. I use scotchbox but with a multiple vhost setup with apache on the host machine, synched to my local files. This works, but obviously the performance is not great, especially with so many projects on each vm. I have also played around with just using one vm per project, but I want something better.

I have done some reading about docker, and using vagrant with docker, and would like to go that route. Problem is I keep running into issues, and I have tried several different approaches. I did happen to get a setup going where I used a host vm to attach docker and then spin up a container for Nginx..initially I had some port forwarding issues but resolved that.

  • execute 2 commands within container [duplicate]
  • Mount host directories in docker compose
  • Docker swarm: guarantee high availability after restart
  • Explanation of this docker file?
  • docker - local DNS
  • Connecting golang and redis through docker
  • My question is, how have some of you went about setting this up? What does your Vagrantfile look like for the host and for the project? What other scripts are you loading? How are you handling multiple projects, file sharing and hostnames?

    I have read so many different questions/answers and walkthroughs and none of them outline specifically what I am asking, so any discussion on the topic is greatly appreciated!

  • Add supervisor in php:7-fpm image
  • Cassandra Container Dynamic storage in host
  • rationale behind docker compose “links” order
  • Docker-compose on Windows 7: how to import a db dump when using a yaml file?
  • docker-compose --x-networking up not working
  • How to debug dockerfiles when using gcloud and google app engine
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.