refactor: use namespaced docker commands for interacting with the docker binary

This commit is contained in:
Jose Diaz-Gonzalez
2023-02-07 03:39:42 -05:00
parent 13eeed1582
commit 0c04ad8dcb
7 changed files with 28 additions and 28 deletions

View File

@@ -9,11 +9,11 @@ plugin-install() {
declare IMAGE="$1"
if [[ "$PLUGIN_DISABLE_PULL" == "true" ]]; then
echo " ! ${PLUGIN_DISABLE_PULL_VARIABLE} environment variable detected. Not running pull command." 1>&2
echo " ! docker pull ${IMAGE}" 1>&2
echo " ! docker image pull ${IMAGE}" 1>&2
return
fi
if [[ "$(docker images -q "${IMAGE}" 2>/dev/null)" == "" ]]; then
docker pull "${IMAGE}"
if [[ "$(docker image ls -q "${IMAGE}" 2>/dev/null)" == "" ]]; then
docker image pull "${IMAGE}"
fi
}