Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
PR #1699: fix docker check if docker is a wrapper for podman
Browse files Browse the repository at this point in the history
  • Loading branch information
pagrubel authored Sep 6, 2023
1 parent ff5cf6e commit 5d8f4c2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,15 @@ vset () {
fi
}


# Do we need sudo to run docker?
if docker info > /dev/null 2>&1; then
# Is Docker present, and if so, do we need sudo? If docker is a wrapper for
# podman, “docker info” hangs (#1656), so treat that as not found.
if ( ! command -v docker > /dev/null 2>&1 ) \
|| ( docker --help 2>&1 | grep -Fqi podman ); then
docker_ () {
echo 'docker not found; unreachable code reached' 1>&1
exit 1
}
elif docker info > /dev/null 2>&1; then
docker_ () {
docker "$@"
}
Expand Down

0 comments on commit 5d8f4c2

Please sign in to comment.