use local build image in vagrant

This commit is contained in:
Chai Feng 2018-12-02 07:55:34 +08:00
parent 665d3c5a2a
commit 0c3da26e83
2 changed files with 4 additions and 1 deletions

3
Vagrantfile vendored
View File

@ -66,6 +66,9 @@ Vagrant.configure('2') do |config|
set -ex
docker build -t #{ufw_docker_agent_image} /vagrant
docker push #{ufw_docker_agent_image}
echo "export UFW_DOCKER_AGENT_IMAGE=#{ufw_docker_agent_image}" > /etc/profile.d/ufw-docker.sh
echo "Defaults env_keep += UFW_DOCKER_AGENT_IMAGE" > /etc/sudoers.d/98_ufw-docker
SHELL
master.vm.provision "swarm-init", type: 'shell', inline: <<-SHELL

View File

@ -11,7 +11,7 @@ GREP_REGEXP_INSTANCE_NAME="[-_.[:alnum:]]\\+"
DEFAULT_PROTO=tcp
ufw_docker_agent=ufw-docker-agent
ufw_docker_agent_image="${ufw_docker_agent_image:-chaifeng/${ufw_docker_agent}:181005}"
ufw_docker_agent_image="${UFW_DOCKER_AGENT_IMAGE:-chaifeng/${ufw_docker_agent}:181005}"
function ufw-docker--status() {
ufw-docker--list "$GREP_REGEXP_INSTANCE_NAME"