You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: make/install.sh
+19-4Lines changed: 19 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ set +o noglob
9
9
10
10
usage=$'Please set hostname and other necessary attributes in harbor.yml first. DO NOT use localhost or 127.0.0.1 for hostname, because Harbor needs to be accessed by external clients.
11
11
Please set --with-trivy if needs enable Trivy in Harbor.
12
+
Please set --with-podman if you want to force prepare to treat the Docker CLI as Podman.
12
13
Please do NOT set --with-chartmuseum, as chartmusuem has been deprecated and removed.
13
14
Please do NOT set --with-notary, as notary has been deprecated and removed.'
14
15
item=0
@@ -17,6 +18,8 @@ item=0
17
18
with_clair=$false
18
19
# trivy is not enabled by default
19
20
with_trivy=$false
21
+
# podman option not enabled by default
22
+
with_podman=$false
20
23
21
24
# flag to using docker compose v1 or v2, default would using v1 docker-compose
22
25
DOCKER_COMPOSE=docker-compose
@@ -28,6 +31,8 @@ while [ $# -gt 0 ]; do
28
31
exit 0;;
29
32
--with-trivy)
30
33
with_trivy=true;;
34
+
--with-podman)
35
+
with_podman=true;;
31
36
*)
32
37
note "$usage"
33
38
exit 1;;
@@ -64,13 +69,23 @@ then
64
69
prepare_para="${prepare_para} --with-trivy"
65
70
fi
66
71
72
+
if [ $with_podman ]
73
+
then
74
+
prepare_para="${prepare_para} --with-podman"
75
+
fi
76
+
67
77
./prepare $prepare_para
78
+
68
79
echo""
69
80
70
-
if [ -n"$DOCKER_COMPOSE ps -q" ]
71
-
then
72
-
note "stopping existing Harbor instance ..."
73
-
$DOCKER_COMPOSE down -v
81
+
# Check if any containers started by compose are present. Capture the compose
82
+
# output and filter to only valid container IDs so vendor warnings (for
83
+
# example "Emulate Docker CLI using podman...") don't make the check true.
0 commit comments