From a7852decd5023a767e2565a7994f36bb9ad4338d Mon Sep 17 00:00:00 2001 From: Ben Parees Date: Fri, 28 Oct 2016 16:27:33 -0400 Subject: [PATCH] remove -f flag on docker tag --- .../action/push_openshift_images.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/vagrant-openshift/action/push_openshift_images.rb b/lib/vagrant-openshift/action/push_openshift_images.rb index f1308e1d..fd1bab5d 100644 --- a/lib/vagrant-openshift/action/push_openshift_images.rb +++ b/lib/vagrant-openshift/action/push_openshift_images.rb @@ -47,9 +47,9 @@ def push_image(centos_namespace,rhel_namespace,image_name, git_ref, registry) git_ref=$(git rev-parse --short HEAD) echo "Pushing image #{image_name}:#{git_ref}..." -docker tag -f #{centos_namespace}/#{image_name}-centos7 #{registry}#{centos_namespace}/#{image_name}-centos7:#{git_ref} -docker tag -f #{centos_namespace}/#{image_name}-centos7 #{registry}#{centos_namespace}/#{image_name}-centos7:latest -docker tag -f #{centos_namespace}/#{image_name}-centos7 docker.io/#{centos_namespace}/#{image_name}-centos7:latest +docker tag #{centos_namespace}/#{image_name}-centos7 #{registry}#{centos_namespace}/#{image_name}-centos7:#{git_ref} +docker tag #{centos_namespace}/#{image_name}-centos7 #{registry}#{centos_namespace}/#{image_name}-centos7:latest +docker tag #{centos_namespace}/#{image_name}-centos7 docker.io/#{centos_namespace}/#{image_name}-centos7:latest # We can't fully parallelize this because docker fails when you push to the same repo at the # same time (using different tags), so we do two groups of push operations. @@ -73,8 +73,8 @@ def push_image(centos_namespace,rhel_namespace,image_name, git_ref, registry) docker push #{registry}#{centos_namespace}/#{image_name}-centos7:latest if [ #{rhel_namespace} != "SKIP" ]; then - docker tag -f #{rhel_namespace}/#{image_name}-rhel7 #{registry}#{rhel_namespace}/#{image_name}-rhel7:#{git_ref} - docker tag -f #{rhel_namespace}/#{image_name}-rhel7 #{registry}#{rhel_namespace}/#{image_name}-rhel7:latest + docker tag #{rhel_namespace}/#{image_name}-rhel7 #{registry}#{rhel_namespace}/#{image_name}-rhel7:#{git_ref} + docker tag #{rhel_namespace}/#{image_name}-rhel7 #{registry}#{rhel_namespace}/#{image_name}-rhel7:latest # this one is failing when done in parallel for unknown reasons docker push #{registry}#{rhel_namespace}/#{image_name}-rhel7:#{git_ref} @@ -136,9 +136,9 @@ def call(env) set +e echo "Pre-pulling base images ..." docker pull #{@options[:registry]}openshift/base-centos7 -[[ "$?" == "0" ]] && docker tag -f #{@options[:registry]}openshift/base-centos7 openshift/base-centos7 +[[ "$?" == "0" ]] && docker tag #{@options[:registry]}openshift/base-centos7 openshift/base-centos7 docker pull #{@options[:registry]}openshift/base-rhel7 -[[ "$?" == "0" ]] && docker tag -f #{@options[:registry]}openshift/base-rhel7 openshift/base-rhel7 +[[ "$?" == "0" ]] && docker tag #{@options[:registry]}openshift/base-rhel7 openshift/base-rhel7 } cmd += %{