Skip to content
This repository has been archived by the owner on Dec 4, 2019. It is now read-only.

Problem with Docker Provisioner #26

Open
jamiejackson opened this issue Jun 30, 2017 · 5 comments
Open

Problem with Docker Provisioner #26

jamiejackson opened this issue Jun 30, 2017 · 5 comments

Comments

@jamiejackson
Copy link

I assumed I'd be able to build an image with the Docker provisioner. Bad assumption?

...
==> db_master: Setting hostname...
==> db_master: Configuring and enabling network interfaces...
==> db_master: Installing NFS client...
==> db_master: Exporting NFS shared folders...
==> db_master: Preparing to edit /etc/exports. Administrator privileges will be required...
==> db_master: Mounting NFS shared folders...
==> db_master: Running provisioner: docker...
    db_master: Installing Docker onto machine...
Vagrant attempted to execute the capability 'docker_install'
on the detect guest OS 'alpine', 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.

Vagrantfile

Vagrant.configure("2") do |config|
  

  config.vbguest.auto_update = false
  config.vm.synced_folder ".", "/vagrant", type: "nfs"

  config.vm.provision "docker" do |d|
    d.build_image "/vagrant/5.7"
  end

  config.vm.define "db_master" do |web|
    web.vm.box = "maier/alpine-3.6-x86_64"
    web.vm.hostname = 'db_master'

    web.vm.network :private_network, ip: "192.168.56.101"

    web.vm.provider :virtualbox do |v|
      v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
      v.customize ["modifyvm", :id, "--memory", 512]
      v.customize ["modifyvm", :id, "--name", "db_master"]
    end
  end

  config.vm.define "db_slave" do |db|
    db.vm.box = "maier/alpine-3.6-x86_64"
    db.vm.hostname = 'db_slave'

    db.vm.network :private_network, ip: "192.168.56.102"

    db.vm.provider :virtualbox do |v|
      v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
      v.customize ["modifyvm", :id, "--memory", 512]
      v.customize ["modifyvm", :id, "--name", "db_slave"]
    end
  end
end
@maier
Copy link
Owner

maier commented Jun 30, 2017

Not sure what a 'docker provisioner' is, must be a new vagrant feature. I'll need to read up on it.

@jamiejackson
Copy link
Author

FYI: https://www.vagrantup.com/docs/provisioning/docker.html

It was introduced in Vagrant 1.4 (2013).

@maier
Copy link
Owner

maier commented Jul 6, 2017

Never noticed it... Looking into what is needed.

@maier
Copy link
Owner

maier commented Jul 6, 2017

Yeah, I found that as well. The support for installing is in the provisioner itself not the guest. I'm going to try adding the capabilities to the guest to see if the provisioner can use them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants