Skip to content

Commit

Permalink
fix docker commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdotcosta committed Apr 18, 2024
1 parent f27fa99 commit 7403d3e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions kind/kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ function validate_ingress() {
}

function define_runtime_commands() {
note "2" "#define_runtime_commands()..."
note "2" "CRI Provider: ${CRI_PROVIDER}"
note "2" "Rootless: ${ROOTLESS_CONTAINERS}"
note "2" "OS Type: ${OSTYPE}"
Expand All @@ -715,12 +716,16 @@ function define_runtime_commands() {
"linux-gnu"*)
# DOCKER_RESTART_COMMAND="sudo systemctl restart docker"
NETWORK_RM_CMD="${CRI_COMMAND} network rm -f kind"
if [ "${ROOTLESS_CONTAINERS}" == 'y' ]; then
CRI_COMMAND="podman"
export KIND_EXPERIMENTAL_PROVIDER=podman
else
CRI_COMMAND="sudo podman"
KIND_COMMAND="sudo --preserve-env kind"
if [ "${CRI_PROVIDER}" == 'podman' ]; then
if [ "${ROOTLESS_CONTAINERS}" == 'y' ]; then
CRI_COMMAND="podman"
export KIND_EXPERIMENTAL_PROVIDER=podman
else
CRI_COMMAND="sudo podman"
KIND_COMMAND="sudo --preserve-env kind"
fi
elif [ "${CRI_PROVIDER}" == 'docker' ]; then
CRI_COMMAND="docker"
fi
;;
"darwin"*)
Expand Down

0 comments on commit 7403d3e

Please sign in to comment.