forked from dotmesh-io/dotmesh
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprime.sh
More file actions
executable file
·30 lines (23 loc) · 804 Bytes
/
prime.sh
File metadata and controls
executable file
·30 lines (23 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -e
declare -A cache
while read p; do
read -r -a items <<< "$p"
cache[${items[0]}]=${items[1]}
done < kubernetes/images.txt
docker pull quay.io/dotmesh/etcd:v3.0.15
docker tag quay.io/dotmesh/etcd:v3.0.15 $(hostname).local:80/dotmesh/etcd:v3.0.15
docker push $(hostname).local:80/dotmesh/etcd:v3.0.15
docker pull busybox
docker tag busybox $(hostname).local:80/busybox
docker push $(hostname).local:80/busybox
docker pull mysql:5.7.17
docker tag mysql:5.7.17 $(hostname).local:80/mysql:5.7.17
docker push $(hostname).local:80/mysql:5.7.17
# Cache images required by Kubernetes
for fq_image in "${!cache[@]}"; do
local_name="$(hostname).local:80/${cache[$fq_image]}"
docker pull $fq_image
docker tag $fq_image $local_name
docker push $local_name
done