From dff7052fd441495bc3d8a4e8a8c07b9c5118d18a Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sun, 16 Mar 2025 21:08:40 +0200
Subject: [PATCH] Workbench: Update pipx usage.

Use the new `--global` option for installation and remove the
environment variables that override the default behavior for the global
installations.
---
 workbench/Dockerfile | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/workbench/Dockerfile b/workbench/Dockerfile
index 2ad7d99..927a79a 100644
--- a/workbench/Dockerfile
+++ b/workbench/Dockerfile
@@ -10,7 +10,7 @@ RUN curl https://github.com/duckdb/duckdb/releases/download/v1.0.0/duckdb_cli-li
 FROM registry.shore.co.il/toolbx:latest
 COPY --from=temp /usr/local/bin/duckdb /usr/local/bin/
 SHELL ["/bin/bash", "-o", "pipefail", "-xc"]
-ENV PATH /opt/pipx/bin:/usr/local/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ENV PATH /usr/local/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 # hadolint ignore=DL3008
 RUN apt-get update && \
     curl "https://github.com/kubernetes/kompose/releases/download/v1.26.1/kompose_1.26.1_$(dpkg --print-architecture).deb" --output /tmp/kompose.deb && \
@@ -178,8 +178,6 @@ RUN apt-get update && \
     rm /etc/ssh/ssh_host_* && \
     ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose && \
     rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/*
-ENV PIPX_HOME /opt/pipx
-ENV PIPX_BIN_DIR /opt/pipx/bin
 # hadolint ignore=DL3013
 RUN export PIP_CONSTRAINT=/tmp/constraint.txt && \
     python3 -m pip freeze | grep packaging >> "$PIP_CONSTRAINT" && \
@@ -254,9 +252,9 @@ RUN export PIP_CONSTRAINT=/tmp/constraint.txt && \
         ziglang \
     && \
     unset PIP_CONSTRAINT && \
-    pipx install chalice && \
-    pipx install curator-opensearch && \
-    CFLAGS="-Wno-error=incompatible-pointer-types" pipx install https://github.com/aws/aws-cli/archive/refs/heads/dependabot/pip/v2/ruamel-yaml-clib-0.2.12.zip && \
+    pipx install --global chalice && \
+    pipx install --global curator-opensearch && \
+    CFLAGS="-Wno-error=incompatible-pointer-types" pipx install --global https://github.com/aws/aws-cli/archive/refs/heads/dependabot/pip/v2/ruamel-yaml-clib-0.2.12.zip && \
     rm -rf /tmp/* /var/tmp/* ~/.cache/*
 ENV COREPACK_HOME=/usr/local/share/corepack
 # hadolint ignore=DL3016
-- 
GitLab