Hi,
I’ve provisioned a VM with Docker, and docker-compose
using the vagrant-docker-compose
plugin. My host machine is connected to a VPN using OpenVPN.
I’ve observed that docker pull
inside the VM (from a repo in the VPN) is extremely slow compared to the same operation in the host (hours versus ~15 minutes). Relevant sections of my Vagrantfile
follow:
# ...
# config.vm.network "private_network", ip: "192.168.56.99"
# ...
# config.vm.network "public_network"
config.vagrant.plugins = "vagrant-docker-compose"
config.vm.provision :docker
config.vm.provision :docker_compose, compose_version: "1.27.4"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
# Customize the amount of memory on the VM
vb.customize ["modifyvm", :id, "--memory", "16384"] # 16G
vb.customize ["modifyvm", :id, "--cpus", "4"]
vb.customize ["modifyvm", :id, "--cpuexecutioncap", "90"] # Use max 90% CPU available to host
end
Any ideas? What am I missing?
Thanks,
Manoj