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.

  • How to connect to current container when starting Docker?
  • Run Python Console via docker-compose on Pycharm
  • Docker IPv6: Disable IPv4 in bridge docker0 and docker network
  • Docker-compose fails with error “No command specified”
  • Development dependencies in Dockerfile or separate Dockerfiles for production and testing
  • Why might Docker Compose restart be rendering container output an increasing number of times?
  • 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!

  • changes made inside attached volume in container not coming up in host volume
  • App in docker container is not accessible on the listening port with net=host
  • How to access postgres database on host from within docker container?
  • Reverse proxying with dockerized nginx
  • Webdriver exception: “chrome not reachable”
  • Docker error cannot delete docker container, conflict: unable to remove repository reference
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.