Skip to content

Use python docker compose#164

Merged
gchazot merged 5 commits intomasterfrom
use-python-docker-compose
Mar 12, 2024
Merged

Use python docker compose#164
gchazot merged 5 commits intomasterfrom
use-python-docker-compose

Conversation

@gchazot
Copy link
Copy Markdown

@gchazot gchazot commented Mar 11, 2024

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.

instead of just the first one installed in the Path.

This is to avoid picking the version (v2) installed by recent docker in the path and is not compatible yet
@gchazot gchazot force-pushed the use-python-docker-compose branch from 90dbd57 to bd96529 Compare March 11, 2024 16:45
@gchazot gchazot force-pushed the use-python-docker-compose branch from 715f073 to 59630df Compare March 11, 2024 19:41
@gchazot gchazot merged commit 016e8d6 into master Mar 12, 2024
@gchazot gchazot deleted the use-python-docker-compose branch March 12, 2024 12:05
@gchazot
Copy link
Copy Markdown
Author

gchazot commented Mar 12, 2024

Thanks @DilaraOflaz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants