getting the below error in my pipeline. Can anyone help me on this ?
Am trying the deploy my ecs service via bitbucket pipelines but facing this error. I tried updating docker, pip, docker-compose everything but no luck
current versions:
docker-compose: 1.29.2
pip: 23.3.1
docker: latest
My yaml file code:
name: "Deployment"
services:
- docker
caches:
- node
- docker
script:
- pip install awscli docker-compose
- docker-compose --version
- aws configure set aws_access_key "${AWS_ACCESS_KEY}"
- aws configure set aws_secret_key "${AWS_SECRET_KEY}"
- docker-compose -f ./docker/docker-compose.stg.yml build
- eval $(aws ecr get-login --no-include-email --region us-east-1 | sed 's;https://;;g')
- docker push ${DOCKER_REGISTRY}/dashboard-service:stg
- aws ecs update-service --cluster new-services --service dashboard-service --force-new-deployment```
**ERROR CODE:**
+ docker-compose -f ./docker/docker-compose.stg.yml build
Traceback (most recent call last):
File "/usr/local/bin/docker-compose", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/compose/cli/main.py", line 81, in main
command_func()
File "/usr/local/lib/python3.8/site-packages/compose/cli/main.py", line 200, in perform_command
project = project_from_options('.', options)
File "/usr/local/lib/python3.8/site-packages/compose/cli/command.py", line 60, in project_from_options
return get_project(
File "/usr/local/lib/python3.8/site-packages/compose/cli/command.py", line 152, in get_project
client = get_client(
File "/usr/local/lib/python3.8/site-packages/compose/cli/docker_client.py", line 41, in get_client
client = docker_client(
File "/usr/local/lib/python3.8/site-packages/compose/cli/docker_client.py", line 124, in docker_client
*** kwargs = kwargs_from_env(environment=environment, ssl_version=tls_version)
TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version'***
4
Answers
we figured out the issue.
Docker has release latest version as "7.0" which is not supported in bitbucket. So after install docker-compose forcefully install docker 6.1.3 version.
The
ssl_version
parameter is removed in the docker 7.0.0 package because it uses TLSv1.3 by default.Add constraint to your requirements like "docker<7" as a quick solution.
It seems after the update of bitbucket over the weekend – you might be using a newer version of docker without knowing it. Here is what works ok for me:
Now Docker supports
docker compose
so no need to install and usedocker-compose
anymoreRefer to this article:
https://support.atlassian.com/bitbucket-cloud/docs/use-docker-images-as-build-environments/