-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpull-common-images.sh
64 lines (60 loc) · 1.12 KB
/
pull-common-images.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
default_images=(
"nginx"
"redis"
"mysql"
"mongo"
"alpine"
"node"
"python"
"postgres"
"grafana/grafana"
"prom/prometheus"
"hashicorp/terraform"
"jenkins/jenkins:lts"
"busybox"
"ubuntu"
"golang"
"openjdk"
"ruby"
"php"
"ruby"
"maven"
"gradle"
"rust"
"phpmyadmin"
"elixir"
"perl"
"tensorflow/tensorflow"
"pytorch/pytorch"
"jupyter/base-notebook"
"debian"
"httpd"
"rabbitmq"
"traefik"
"hello-world"
"wordpress"
"haproxy"
"influxdb"
"nextcloud"
"memcached"
)
registry_url="registry.registryhub.ir"
if [ "$#" -gt 0 ]; then
images=("$@")
echo "[🚀] Pulling custom images"
else
images=("${default_images[@]}")
echo "[📥] Pulling default images"
fi
for image in "${images[@]}"; do
full_image="$registry_url/$image"
echo "[⚙️] Pulling $full_image ..."
docker pull $full_image
docker rmi $full_image
if [ $? -ne 0 ]; then
echo "[❌] Failed to pull $full_image"
else
echo "[✅] Seccessfully pulled $full_image"
fi
done