From 0ad2ebbd4772d2543da5b14da1ccddb038886c44 Mon Sep 17 00:00:00 2001 From: Chai Feng Date: Sat, 1 Dec 2018 22:04:21 +0800 Subject: [PATCH] build ufw-docker-agent image in Vagrant --- Vagrantfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index c3bf240..3893fdb 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -60,6 +60,14 @@ Vagrant.configure('2') do |config| daemonize: true end + ufw_docker_agent_image = "192.168.56.130:5000/chaifeng/ufw-docker-agent:test" + + master.vm.provision "docker-build", type: 'shell', inline: <<-SHELL + set -ex + docker build -t #{ufw_docker_agent_image} /vagrant + docker push #{ufw_docker_agent_image} + SHELL + master.vm.provision "swarm-init", type: 'shell', inline: <<-SHELL set -ex docker info | fgrep 'Swarm: active' && exit 0