refactor: use DOCKER_BIN env var instead of calling docker directly

This will allow us to alias the docker binary with podman for most actions - other than updating running containers.
This commit is contained in:
Jose Diaz-Gonzalez
2023-02-07 03:53:08 -05:00
parent 0c04ad8dcb
commit 03e4c519f1
7 changed files with 40 additions and 40 deletions

View File

@@ -46,7 +46,7 @@ service-destroy-cmd() {
service_container_rm "$SERVICE"
dokku_log_verbose_quiet "Removing data"
docker container run --rm -v "$SERVICE_HOST_ROOT/data:/data" -v "$SERVICE_HOST_ROOT/$PLUGIN_CONFIG_SUFFIX:/config" "$PLUGIN_BUSYBOX_IMAGE" chmod 777 -R /config /data
"$DOCKER_BIN" container run --rm -v "$SERVICE_HOST_ROOT/data:/data" -v "$SERVICE_HOST_ROOT/$PLUGIN_CONFIG_SUFFIX:/config" "$PLUGIN_BUSYBOX_IMAGE" chmod 777 -R /config /data
rm -rf "$SERVICE_ROOT"
plugn trigger service-action post-delete "$PLUGIN_COMMAND_PREFIX" "$SERVICE"