Closed larsks closed 1 year ago
vagrant-up.log
Given the following Vagrantfile:
$script = <<-SCRIPT #!/bin/sh apk update apk add python3 SCRIPT Vagrant.configure("2") do |config| config.vm.provider "docker" do |d| d.image = "docker.io/alpine:latest" d.cmd = ["sleep", "inf"] d.remains_running = true end config.vm.provision "shell", inline: $script end
I expect that running vagrant up will:
vagrant up
vagrant_default_...
Vagrant creates a container:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 208b807368ad alpine:latest "sleep inf" 33 seconds ago Up 32 seconds vagrant_default_1690081570
But does not run the provisioner. The logs (see the earlier link) include:
INFO has_provisioner: Skipping running provisioner no name, type: shell
That seems to indicate the provisioner was explicitly skipped, but I'm not sure why. Running vagrant provision does not run the provisioner either.
vagrant provision
Vagrant 2.2.19
Fedora 38
N/A
(See above)
I did not realize that vagrant requires ssh to be installed in an container. I thought it would use docker exec for provisioning.
docker exec
Debug output
vagrant-up.log
Expected behavior
Given the following Vagrantfile:
I expect that running
vagrant up
will:vagrant_default_...
)Actual behavior
Vagrant creates a container:
But does not run the provisioner. The logs (see the earlier link) include:
That seems to indicate the provisioner was explicitly skipped, but I'm not sure why. Running
vagrant provision
does not run the provisioner either.Reproduction information
Vagrant version
Vagrant 2.2.19
Host operating system
Fedora 38
Guest operating system
N/A
Steps to reproduce
(See above)
Vagrantfile
(See above)