EDITD / kubetools

:nut_and_bolt: Kubetools is a tool and processes for developing and deploying microservices to Kubernetes.
MIT License
13 stars 2 forks source link

Use python docker compose #164

Closed gchazot closed 6 months ago

gchazot commented 6 months ago

Purpose of PR

When ktd is invoked, it used to call docker-compose command from the current PATH. This causes conflict with newer versions of docker which install their own version of docker-compose in the PATH. The version from Docker is using the "Compose V2" standard which is not yet supported by kubetools (WIP: #163).

This change makes sure that we call the "python" version of docker-compose. By using the current "executable", i.e. the current interpreter which is running ktd, and calling compose as a Python module, we maximise the chances that the version of docker-compose used is the Python one that was installed as a dependency of kubetools.

This creates the opportunity to install kubetools in its own separate virtualenv and run it by linking kubetools and ktd executables into the PATH. In a similar fashion, this should allow the support of pipx as an installation method.

gchazot commented 6 months ago

Thanks @DilaraOflaz