2017-08-07 08:02:38 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-01-14 04:11:12 +01:00
|
|
|
#docker pull $3:$4
|
2021-03-17 15:33:02 +01:00
|
|
|
set -x
|
2017-08-07 08:02:38 +02:00
|
|
|
|
2018-01-23 06:04:19 +01:00
|
|
|
IP=$1
|
2019-12-27 07:11:01 +01:00
|
|
|
notaryServerEndpoint=$5
|
2020-01-14 04:11:12 +01:00
|
|
|
tag_src=$6
|
2021-03-17 15:33:02 +01:00
|
|
|
USER=$7
|
|
|
|
PASSHRASE=$8
|
2017-09-18 09:46:40 +02:00
|
|
|
echo $IP
|
2019-12-18 03:42:20 +01:00
|
|
|
|
2017-08-07 08:02:38 +02:00
|
|
|
export DOCKER_CONTENT_TRUST=1
|
2019-12-27 07:11:01 +01:00
|
|
|
export DOCKER_CONTENT_TRUST_SERVER=https://$notaryServerEndpoint
|
2017-08-07 08:02:38 +02:00
|
|
|
|
2017-09-18 09:46:40 +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
|
2017-08-07 08:02:38 +02:00
|
|
|
|
2021-03-17 15:33:02 +01:00
|
|
|
docker login -u $USER -p $PASSHRASE $IP
|
2020-01-14 04:11:12 +01:00
|
|
|
docker tag $tag_src $IP/$2/$3:$4
|
2019-12-18 03:42:20 +01:00
|
|
|
docker push $IP/$2/$3:$4
|