mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-29 20:18:05 +01:00
a0462f0baa
Signed-off-by: DQ <dengq@vmware.com>
15 lines
439 B
Bash
Executable File
15 lines
439 B
Bash
Executable File
#!/bin/bash
|
|
|
|
IP=`ip addr s eth0 |grep "inet "|awk '{print $2}' |awk -F "/" '{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"
|