2016-08-31 04:12:22 +00:00
|
|
|
#!/bin/bash
|
2019-12-11 11:11:20 +00:00
|
|
|
set -x
|
|
|
|
set -e
|
2016-08-31 04:12:22 +00:00
|
|
|
|
2019-12-11 11:11:20 +00:00
|
|
|
IP=$(hostname -I | awk '{print $1}')
|
2016-08-31 04:12:22 +00:00
|
|
|
docker pull hello-world
|
2018-04-12 11:51:16 +00:00
|
|
|
docker pull busybox
|
2016-08-31 04:12:22 +00:00
|
|
|
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
|
2019-10-14 10:25:11 +00:00
|
|
|
echo "$? pushed hello world"
|
2016-08-31 04:12:22 +00:00
|
|
|
|
2018-04-12 11:51:16 +00:00
|
|
|
docker tag busybox $IP:5000/library/busybox:latest
|
|
|
|
docker push $IP:5000/library/busybox:latest
|
2019-10-14 10:25:11 +00:00
|
|
|
echo "$? pushed busybox"
|