2019-08-09 04:50:06 +02:00
|
|
|
#!/bin/sh
|
|
|
|
IP=$1
|
2020-06-04 12:17:26 +02:00
|
|
|
NOTARY_URL=$5
|
2019-08-09 04:50:06 +02:00
|
|
|
PASSHRASE='Harbor12345'
|
2021-01-19 11:12:23 +01:00
|
|
|
IMAGE=$IP/$2/$3:$4
|
2019-08-09 04:50:06 +02:00
|
|
|
|
|
|
|
echo $IP
|
|
|
|
|
|
|
|
export DOCKER_CONTENT_TRUST=1
|
2020-06-04 12:17:26 +02:00
|
|
|
export DOCKER_CONTENT_TRUST_SERVER=$NOTARY_URL
|
2019-08-09 04:50:06 +02:00
|
|
|
|
|
|
|
export NOTARY_ROOT_PASSPHRASE=$PASSHRASE
|
|
|
|
export NOTARY_TARGETS_PASSPHRASE=$PASSHRASE
|
|
|
|
export NOTARY_SNAPSHOT_PASSPHRASE=$PASSHRASE
|
|
|
|
export DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE=$PASSHRASE
|
|
|
|
export DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE=$PASSHRASE
|
|
|
|
export DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE=$PASSHRASE
|
|
|
|
export DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE=$PASSHRASE
|
|
|
|
|
|
|
|
docker login -u admin -p Harbor12345 $IP
|
2021-01-19 11:12:23 +01:00
|
|
|
|
|
|
|
docker tag $3:$4 $IMAGE
|
|
|
|
docker push $IMAGE
|
|
|
|
docker rmi -f $IMAGE
|
2019-08-09 04:50:06 +02:00
|
|
|
|