Artem Zhirkov
Artem Zhirkov

Reputation: 157

Vagrant fails to provision docker container

My Vagrantfile:

Vagrant.require_version ">= 1.6.0"
VAGRANTFILE_API_VERSION = "2"
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'docker'

Vagrant.configure(2) do |config|

config.vm.provision :chef_solo do |chef|
  chef.add_recipe "tomcat"
end
config.vm.provider "docker" do |docker|
  docker.create_args = ["-d"]
  docker.has_ssh = true
end
config.ssh.port = 22
config.ssh.username = "root"
config.ssh.password = "password"

end

and Dockerfile:

FROM precise-prepared
##ADD SCRIPTS IN DOCKER IMAGE
ADD ssh.sh /ssh.sh
RUN chmod +x /ssh.sh
RUN echo "root:password" | chpasswd
EXPOSE 22
##START ssh services during startup
CMD ["/ssh.sh"]

precise-prepared is just a slightly modified ubuntu:12.04 docker image.

When I'm running vagrant up command it fails with the following error:

Vagrant attempted to execute the capability 'chef_install' on the detect guest OS 'linux', but the guest doesn't support that capability. This capability is required for your configuration of Vagrant. Please either reconfigure Vagrant to avoid this capability or fix the issue by creating the capability.

Is it vagrant's docker provider doesn't support provisioning with chef or I am missing something?

Thanks

Upvotes: 1

Views: 340

Answers (0)

Related Questions