File tree 2 files changed +18
-3
lines changed 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -104,15 +104,15 @@ function configureDockerDNS {
104
104
do
105
105
if [ -n " $d " ]
106
106
then
107
- opts=" --dns=$d $opts "
107
+ opts=" $opts --dns=$d "
108
108
fi
109
109
done
110
110
rm /tmp/dns
111
111
112
112
domain=$( sed -n -e ' s/^domain //p' /etc/resolv.conf)
113
113
if [ -n " $domain " ]
114
114
then
115
- opts=" --dns-search=$domain $opts "
115
+ opts=" $opts --dns-search=$domain "
116
116
fi
117
117
118
118
search=$( sed -n -e ' s/^search //p' /etc/resolv.conf)
@@ -123,12 +123,24 @@ function configureDockerDNS {
123
123
do
124
124
if [ -n " $s " ]
125
125
then
126
- opts=" --dns-search=$s $opts "
126
+ opts=" $opts --dns-search=$s "
127
127
fi
128
128
done
129
129
fi
130
130
131
131
echo Setting docker: $opts
132
132
echo DOCKER_OPTS=$opts > /etc/default/docker
133
133
systemctl restart docker
134
+ }
135
+
136
+ function pushPhoton {
137
+ set +e
138
+ basedir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
139
+ registry_version=$( sed -n -e ' s|.*library/registry:||p' $basedir /../harbor/docker-compose.yml)
140
+ docker run -d --name photon_pusher -v /data/registry:/var/lib/registry -p 5000:5000 registry:$registry_version
141
+ docker tag photon:1.0 127.0.0.1:5000/library/photon:1.0
142
+ sleep 5
143
+ docker push 127.0.0.1:5000/library/photon:1.0
144
+ docker rm -f photon_pusher
145
+ set -e
134
146
}
Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ tar -zxvf $base_dir/../harbor-offline-installer*.tgz -C $base_dir/../
36
36
echo " Loading images..."
37
37
load
38
38
39
+ echo " Pushing photon to project library..."
40
+ pushPhoton
41
+
39
42
echo " Configuring Harbor..."
40
43
chmod 600 $base_dir /../harbor/harbor.cfg
41
44
You can’t perform that action at this time.
0 commit comments