docker-pull dc-centos:7 the image name is 172.168.xxx.2:5001/dc-centos:7 when you need run a container, should use this image name: 172.168.xxx.2:5001/dc-centos:7 eg: docker run -it 172.168.xxx.2:5001/dc-centos:7 sh
for $CCI_SRC/providers/docker/docker.rb: the image_name is based on job.yaml like dc-centos:7, so tag the image to dc-centos:7
Signed-off-by: Xiao Shenwei xiaoshenwei96@163.com --- sbin/docker-pull | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sbin/docker-pull b/sbin/docker-pull index 61ead7e..5972913 100755 --- a/sbin/docker-pull +++ b/sbin/docker-pull @@ -14,7 +14,9 @@ image_name=$1 local_repository() { echo "pull image from local repository" - docker pull $DOCKER_REGISTRY_HOST:$DOCKER_REGISTRY_PORT/$image_name + docker pull $DOCKER_REGISTRY_HOST:$DOCKER_REGISTRY_PORT/$image_name && { + docker tag $DOCKER_REGISTRY_HOST:$DOCKER_REGISTRY_PORT/$image_name $image_name + } }
docker_hub()