DockerCompose start fails to start dockers, gives "got an unexpected keyword argument ssl_version" error in logs
Describe the bug
Tried running:
compose = DockerCompose(
dir_name, compose_file_name="docker-compose.yaml", pull=True, build=True
)
compose.start()
but nothing happened, checked logs with
compose.get_logs()
got "got an unexpected keyword argument ssl_version" in the logs, apparently with the newest python docker package, the ssl_version as a parameter is no longer supported - https://docker-py.readthedocs.io/en/stable/change-log.html
starting with version 7.0.0
To Reproduce
run the following with the docker 7.0.0 package
compose = DockerCompose(
dir_name, compose_file_name="docker-compose.yaml", pull=True, build=True
)
compose.start()
Runtime environment
Fedora Linux with python 3.9 and 24.0.5 docker version (7.0.0 pip package)
switching to 6.1.3 pip package seems to do the trick
Hello, and thanks for reporting this issue!
apparently with the newest python docker package
DockerCompose does not use any docker package internals, only command line. The dependency on docker-compose used to be for convenience of having the CLI be installed.
import subprocess
from typing import Iterable, List, Optional, Tuple, Union
import requests
from testcontainers.core.exceptions import NoSuchPortExposed
from testcontainers.core.waiting_utils import wait_container_is_ready
can you give the results of these commands, for some more information:
docker version
docker compose version
[!Note] I would link the source code, but due to maintenance issues, the
composepackage has been removed frommain- we're working on reviving the maintenance, but it takes some time (which I am sorry for). The new implementation ofDockerComposewill likely be a new rewrite, due to the lack of a compose package in python.
It should also be noted that latest testcontainers versions on Pypi depends on docker <=4 (theoretically)