harbor/tests/pushimage.sh
Wang Yan c6814f2bcc
move ci from travis to gitaction (#13891)
1, deprecate travis, and use the gitaction for instread.
2, upgrade golang version to v1.15.6

Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-06 15:30:54 +08:00

15 lines
400 B
Bash
Executable File

#!/bin/bash
IP=$(hostname -I | awk '{print $1}')
docker pull hello-world
docker pull busybox
docker login -u admin -p Harbor12345 $IP:5000
docker tag hello-world $IP:5000/library/hello-world:latest
docker push $IP:5000/library/hello-world:latest
echo "$? pushed hello world"
docker tag busybox $IP:5000/library/busybox:latest
docker push $IP:5000/library/busybox:latest
echo "$? pushed busybox"