Skip to content

Commit 3d66bd6

Browse files
committed
Name the registry a special kcl-registry instead of a common registry.
Signed-off-by: Lan Liang <[email protected]>
1 parent 9c5c551 commit 3d66bd6

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

kind/v1alpha4/kind_x-k8s_io_v1alpha4_cluster.k

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ schema Networking:
1212
podSubnet?: str
1313
ipFamily?: str
1414
kubeProxyMode?: str
15+
disableDefaultCNI?: bool
1516

1617
schema ExtraPortMapping:
1718
containerPort?: int

scripts/reg.sh

+7-11
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ mkdir -p ./scripts/registry_auth
77
htpasswd -Bbn test 1234 > ./scripts/registry_auth/htpasswd
88

99
# check if there is a container named registry
10-
if [ "$(docker ps -aq -f name=registry)" ]; then
10+
if [ "$(docker ps -aq -f name=kcl-registry)" ]; then
1111
# stop and remove the container named registry
12-
docker stop registry
13-
docker rm registry
12+
docker stop kcl-registry
13+
docker rm kcl-registry
1414
fi
15+
export KCL_REGISTRY_PORT=${KCL_REGISTRY_PORT:-"5001"}
1516

1617
# start the Docker Registry with authentication
17-
docker run -p 5001:5000 \
18+
docker run -p ${KCL_REGISTRY_PORT}:5000 \
1819
--restart=always \
19-
--name registry \
20+
--name kcl-registry \
2021
-v /var/lib/registry:/var/lib/registry \
2122
-v $PWD/scripts/registry_auth/:/auth/ \
2223
-e "REGISTRY_AUTH=htpasswd" \
@@ -25,9 +26,4 @@ docker run -p 5001:5000 \
2526
-d registry
2627

2728
# clean the registry
28-
docker exec registry rm -rf /var/lib/registry/docker/registry/v2/repositories/
29-
30-
export LOGIN_WITH_KCL=${LOGIN_WITH_KCL:-"0"}
31-
if [ "$LOGIN_WITH_KCL" = "1" ];then
32-
kcl registry login localhost:5001 -u test -p 1234
33-
fi
29+
docker exec kcl-registry rm -rf /var/lib/registry/docker/registry/v2/repositories/

0 commit comments

Comments
 (0)