How do I provision a Dockerfile from Vagrant

前端 未结 3 1282
Happy的楠姐
Happy的楠姐 2021-02-05 10:48

How can I start the provisioning of Docker via an external Dockerfile? My Vagrantfile looks like this at the moment

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


        
3条回答
  •  清歌不尽
    2021-02-05 11:49

    one workaround is through shell provisioning:

    config.vm.provision "shell", inline: "docker build -t username/image /vagrant; docker run -d username/image"
    

提交回复
热议问题