Skip to content

Commit

Permalink
push photon to project library
Browse files Browse the repository at this point in the history
  • Loading branch information
ywk253100 committed Nov 29, 2016
1 parent 4149e74 commit ad33c27
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/ova/script/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,18 @@ function configureDockerDNS {
echo Setting docker: $opts
echo DOCKER_OPTS=$opts > /etc/default/docker
systemctl restart docker
}

function pushPhoton {
set +e
basedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
registry_version=$(sed -n -e 's|.*library/registry:||p' $basedir/../harbor/docker-compose.yml)
docker run -d --name photon_pusher -v /data/registry:/var/lib/registry -p 5000:5000 registry:$registry_version
docker tag photon:1.0 127.0.0.1:5000/library/photon:1.0
sleep 5
echo "Pushing photon..."
docker push 127.0.0.1:5000/library/photon:1.0
docker stop photon_pusher
docker rm -f photon_pusher
set -e
}

0 comments on commit ad33c27

Please sign in to comment.