Hello
I am have running vagrant VM with docker.
I am having issue how to forward ports on already running VM.
My Vagrant file which was changed (port forwarding was added) looks like this:
Vagrant.configure(“2”) do |config|
config.vm.hostname = “debianvm”
#config.vm.network “private_network”, type: “dhcp”
config.ssh.insert_key = false
config.vm.network “forwarded_port”, guest: 2222, host: 22
config.vm.network “forwarded_port”, guest: 5432, host: 5432
config.vm.network “forwarded_port”, guest: 8888, host: 80
config.vm.provision “docker”
config.vm.provider :docker do |docker, override|
override.vm.box = nil
docker.image = “rofrano/vagrant-provider:debian”
docker.remains_running = true
docker.has_ssh = true
docker.privileged = true
docker.ports = [ “5432:5432” ]
docker.volumes = ["/sys/fs/cgroup:/sys/fs/cgroup:ro"]
# Uncomment to force arm64 for testing images
docker.create_args = [’ -p 80:80/tcp’]
end
end
When I do “vagrant reload --provisiom” only 2222 port to 22 is being forward but not others.
thank you