-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker.compose.up()
nonfunctional
#521
Comments
Such assumption ("project dead") comes across as a bit rude/accusatory, especially since you can see multiple merged PRs in the last few weeks, a couple of active discussions, and the linked PR is failing the CI. Enhancements are welcome, it just needs someone to do the work. |
From what I understand, it seems that you expect Python-on-whales to call docker compose v1 which is "dead" or "archived" if I'm using your own words. The source for what I claim is here: https://docs.docker.com/compose/migrate/#can-i-still-use-compose-v1-if-i-want-to You should not use it. Python-on-whales only supports docker compose v2 and the documentation gives instructions to verify that docker compose v2 is installed on your system, which seems to not be the case from the error message you provided. I do agree that the error message isn't great, and could be improved. Furthermore, I don't know if english is your first language or not but as @LewisGaul said, the tone is a bit too strong for a public, open source project. I garantee that I review PRs with a CI passing in a timely manner, I don't garantee that I will fix the CI for the people who are submitting PRs. |
Thank you for documentation update with notes clarifying the dependency requirement of compose v2. That is useful. I'm happy to accept dependency on docker compose v2 rather than a compatibility layer to a deprecated V1. Is a simple fix with addition of V2 package which clarification was needed. To help you I have created proper docker compose installation script:
For simple usersThe instructions on linux, I taylor to make this #!/bin/bash
# Docker Compose V2 installation script by DeityDurg
# Please run this script as root for installation of plugin system-wide.
VERSION='v2.24.0-birthday.10'
CLI_PLUGINS_PATH='/usr/local/lib/docker/cli-plugins'
ARCH='x86_64'
if [ ! -d "$CLI_PLUGINS_PATH" ]; then
echo "Creating directory for docker cli plugins: $CLI_PLUGINS_PATH..."
{
mkdir -p $CLI_PLUGINS_PATH
chown root:docker $CLI_PLUGINS_PATH
chmod 0775 $CLI_PLUGINS_PATH
} 2>/dev/null
if [ $? -ne 0 ]; then
echo "Failed to create directory: $CLI_PLUGINS_PATH"
else
echo "Directory $CLI_PLUGINS_PATH created successfully."
fi
fi
if [ ! -f "$CLI_PLUGINS_PATH/docker-compose" ]; then
echo "Installing docker compose binary version $VERSION to $CLI_PLUGINS_PATH"
{
curl -sSL "https://github.com/docker/compose/releases/download/$VERSION/docker-compose-linux-$ARCH" -o "$CLI_PLUGINS_PATH/docker-compose"
chown root:docker "$CLI_PLUGINS_PATH/docker-compose"
chmod 0770 "$CLI_PLUGINS_PATH/docker-compose"
} 2>/dev/null
if [ $? -ne 0 ]; then
echo "Failed to download docker-compose binary version $CLI_PLUGINS_PATH"
else
echo "Installed docker compose binary $VERSION to $CLI_PLUGINS_PATH successfully."
fi
fi And now when running:
It will be using composer-cli-plugin version V2 on Linux. Also recommend add this to docs, if you like. In regard to harsh tone, it gets a maintainer talking. I make sure maintainers are on top of their stuff., and you are with very detailed information. This is a good project, and useful to me. Good job, you now have a star. ⭐ |
Expected Behavior
docker.compose.up() runs successfully.
Current Behavior
The module crashes because ComposeCLI malforms the command for
docker compose
instead of the correctdocker-compose
due to docker api changes (missing the hyphen). This happens on modern versions of docker compose installed from official docker sources.It is worth of note that many Api for docker compose V3 >= 3.4 are missing in the pydantic models and the developer has not accepted PR for them since October of 2023 (assuming project dead?): See #486 which partially fixes issues with some new Api.
Aside from minor github workflow changes that affect the master branch, there's not been much here lately.
This one is a critical bug that affects core functionality of docker compose for
python-on-whales
package for recent versions of docker.Highly recommended to fix bugs affecting core functionality soon, or mark project archived if work should not continue.
Operating Schema
Docker version:
Compose Version:
Running on WSL version (docker works otherwise):
Python
pyenv
tool versionConda
environment.yml
with.python-version
on3.11.6
:Tested
run.py
A
docker-compose.yml
to use:Crash Traceback
The text was updated successfully, but these errors were encountered: