Skip to content

Commit

Permalink
Merge pull request kubernetes#316 from ddysher/login-to-release
Browse files Browse the repository at this point in the history
Send docker secret to instance before pulling
  • Loading branch information
ddysher committed Jan 20, 2016
2 parents 8e24f54 + b74fd0f commit 496dc6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cluster/caicloud-anchnet/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ function build-instance-image {
wait ${pids}

# Pull necessary addon images.
ssh-to-instance-expect ${MASTER_SSH_EXTERNAL} "mkdir ~/.docker"
scp-then-execute-expect ${MASTER_SSH_EXTERNAL} \
${KUBE_ROOT}/cluster/caicloud/tools/docker-config.json "~/.docker" \
"mv ~/.docker/docker-config.json ~/.docker/config.json"
grep -IhEro "index.caicloud.io/[^\", ]*" ./cluster/caicloud | sort -u |
while read -r image; do
ssh-to-instance-expect ${MASTER_SSH_EXTERNAL} "sudo docker pull $image || echo 'Command failed pulling image'"
Expand All @@ -344,6 +348,7 @@ function build-instance-image {
exit 1
fi
done
ssh-to-instance-expect ${MASTER_SSH_EXTERNAL} "rm -rf ~/.docker"

# Stop the instance and prepare to create image.
anchnet-exec-and-retry "${ANCHNET_CMD} stopinstances ${MASTER_INSTANCE_ID}"
Expand Down

0 comments on commit 496dc6a

Please sign in to comment.