Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using $CONTAINER_ENGINE variable instead of hard-coded docker #2066

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions hack/allocate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ networking() {
--timeout=300s

local kind_addr
kind_addr="$(docker container inspect func-control-plane | jq '.[0].NetworkSettings.Networks.kind.IPAddress' -r)"
kind_addr="$($CONTAINER_ENGINE container inspect func-control-plane | jq '.[0].NetworkSettings.Networks.kind.IPAddress' -r)"

echo "Setting up address pool."
kubectl apply -f - <<EOF
Expand Down Expand Up @@ -209,10 +209,10 @@ registry() {

echo "${em}⑥ Registry${me}"
if [ "$CONTAINER_ENGINE" == "docker" ]; then
docker run -d --restart=always -p "127.0.0.1:50000:5000" --name "func-registry" registry:2
docker network connect "kind" "func-registry"
$CONTAINER_ENGINE run -d --restart=always -p "127.0.0.1:50000:5000" --name "func-registry" registry:2
$CONTAINER_ENGINE network connect "kind" "func-registry"
elif [ "$CONTAINER_ENGINE" == "podman" ]; then
docker run -d --restart=always -p "127.0.0.1:50000:5000" --net=kind --name "func-registry" registry:2
$CONTAINER_ENGINE run -d --restart=always -p "127.0.0.1:50000:5000" --net=kind --name "func-registry" registry:2
fi

kubectl apply -f - <<EOF
Expand Down
Loading