Open trs1991 opened 6 months ago
As a workaround until the task is fixed, add this to the task's inputs:
dockerComposePath: '/usr/libexec/docker/cli-plugins/docker-compose'
Also see: https://github.com/microsoft/azure-pipelines-tasks/issues/17808
Docker Compose v2 is also much more strict with project names (eg cannot contain upper case characters), so this bug also needs to be addressed https://github.com/microsoft/azure-pipelines-tasks/issues/16361
Wow, my entire company is blown away after this change 😡
Why didn't Microsoft issue any warnings months before the change? For example: 'This task will be deprecated, please migrate to docker-compose v2 before the 1st of April.'
Currently, I have to update about 500 microservices names from 'Company.Project.ServiceName' to 'company-project-servicename', which affects a lot of components/configs/DockerFiles entrypoints
There is my temporary workaround to download and use docker-compose v1:
- task: Bash@3
displayName: "Install docker-compose v1"
inputs:
targetType: 'inline'
script: |
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
then add dockerComposePath to DockerCompose@0 task
dockerComposePath: '/home/vsts/.docker/cli-plugins/docker-compose'
docker-compose is deprecated. The functionality is provided by docker command itself. the command should be :
docker, with arguments compose ... rest of args
@fbuser1, would this not solve the problem for you without needing to rename and repath everything?
My company is facing the same. Could the task be adjusted to support docker compose v2?
This works:
dockerComposePath: '/usr/libexec/docker/cli-plugins/docker-compose'
that's the cli plugin, which the command "docker compose" would call. Apparently, it is a binary on its own.
Other options I guess, is to have a step to install the "old" docker-compose somewhere (download and install it) as shown above....
docker-compose is deprecated. The functionality is provided by docker command itself.
So should we start using Docker@2 with command: 'compose'?
And stop using DockerCompose@0
dockerComposePath: '/usr/libexec/docker/cli-plugins/docker-compose' - this is v2, after switching to this path, we started seeing intermittent failure on pulling base image. then I checked the image, the v1 executable is still available just not included in the PATH. So I changed to dockerComposePath: '/usr/local/bin/docker-compose', it's working for us now.
Can we have updates on this? As Docker@0 is deprecating in July. Can we start using Docker@2 in our ADO tasks?
Can we have updates on this? As Docker@0 is deprecating in July. Can we start using Docker@2 in our ADO tasks?
There is no other version of the task other than 0. Am I missing something here?
Can we have updates on this? As Docker@0 is deprecating in July. Can we start using Docker@2 in our ADO tasks?
There is no other version of the task other than 0. Am I missing something here?
There is no DockerCompose@1 or @2 version, only @0 is available.
I think @Jacko1394 @SwapnaVersion1 were referring to Docker task, there are @0/1/2 versions for Docker task, but it does't look like compose is a supported command.
Can we have updates on this? As Docker@0 is deprecating in July. Can we start using Docker@2 in our ADO tasks?
There is no other version of the task other than 0. Am I missing something here?
There is no DockerCompose@1 or @2 version, only @0 is available. I think @Jacko1394 @SwapnaVersion1 were referring to Docker task, there are @0/1/2 versions for Docker task, but it does't look like compose is a supported command.
Yes that is the whole point of the original request, there is no DockerCompose@1/2, but since DockerCompose@0 is now deprecated, there is a need for it to be developed so that support for DockerCompose v2 and above can be implemented as DockerCompose v1 has been removed from hosted agents.
What is the work-around? Our organisation pipelines would fail after July once @1 docker compose is deprecated.
Can we have updates on this? As Docker@0 is deprecating in July. Can we start using Docker@2 in our ADO tasks?
There is no other version of the task other than 0. Am I missing something here?
There is no DockerCompose@1 or @2 version, only @0 is available. I think @Jacko1394 @SwapnaVersion1 were referring to Docker task, there are @0/1/2 versions for Docker task, but it does't look like compose is a supported command.
Yes that is the whole point of the original request, there is no DockerCompose@1/2, but since DockerCompose@0 is now deprecated, there is a need for it to be developed so that support for DockerCompose v2 and above can be implemented as DockerCompose v1 has been removed from hosted agents.
yep, I understood the point of this issue. I was just answering @ashishbhatt-afk's question. And pointing out Docker@0/1/2 don't have compose command, so using Docker task is no help.
What is the work-around? Our organisation pipelines would fail after July once @1 docker compose is deprecated.
@SwapnaVersion1 You can use this workaround, it worked for us. https://github.com/microsoft/azure-pipelines-tasks/issues/19711#issuecomment-2032731303
Bear in mind, make sure you have put depends_on when there is dependent image in your docker compose yaml file, otherwise, you would be seeing the error we were seeing due to docker compose v2 is building images in parallel.
dockerComposePath: '/usr/libexec/docker/cli-plugins/docker-compose' - this is v2, after switching to this path, we started seeing intermittent failure on pulling base image. then I checked the image, the v1 executable is still available just not included in the PATH. So I changed to dockerComposePath: '/usr/local/bin/docker-compose', it's working for us now.
We started getting the following error for windows yesterday/day before:-
Starting: Build Docker Image
==============================================================================
Task : Docker Compose
Description : Build, push or run multi-container Docker applications. Task can be used with Docker or Azure Container registry.
Version : 0.240.2
Author : Microsoft Corporation
Help : https://aka.ms/azpipes-docker-compose-tsg
==============================================================================
##[error]The process 'C:\Windows\system32\docker.exe' failed with exit code 15
fix was again the dockerComposePath
dockerComposePath: C:\ProgramData\docker-compose\docker-compose.exe
we noticed the behavior of dockercompose@0 change too in our ubuntu agent. The default path for docker compose is changed to version 2 after the latest runner-images rolled out. We had to put some fix into docker compose yaml due to the behavior change. And they are going to deprecate v1 again in 9th July. https://github.com/actions/runner-images/issues/9692
Saw this message appeared in console output from yesterday. We've set the dockerComposePath to use V2, to avoid surprise during the removal of v1 executable.
Oh my, what a fine job at change management and versioning we have here 🤡
The DockerCompose@0 task is deprecated. The task uses docker-compose v1 which no longer receives update since July 2023. To use docker compose v2, use the DockerCompose@1 task.
That would be reasonable, if not for the fact that none of the message is true, in fact it is wrong in two separate ways:
docker-compose
(v1) to docker compose
(v2) breaking a whole lot of existing pipelinesWell, at least today it happened with a small increment in the task's version number (0.242.0
to 0.242.8
), which is a slight improvement over two weeks ago when the new behavior hit without any warning under an unchanged version number (0.240.2
) and stayed there for ca. 24 h until it was rolled back as silently as it was introduced.
Oh my, what a fine job at change management and versioning we have here 🤡
The DockerCompose@0 task is deprecated. The task uses docker-compose v1 which no longer receives update since July 2023. To use docker compose v2, use the DockerCompose@1 task.
That would be reasonable, if not for the fact that none of the message is true, in fact it is wrong in two separate ways:
- there is no DockerCompose@1 task published in DevOps at the moment at all and work on it according to code in this repository started only a week ago
- DockerCompose@0 already silently switched from
docker-compose
(v1) todocker compose
(v2) breaking a whole lot of existing pipelinesWell, at least today it happened with a small increment in the task's version number (
0.242.0
to0.242.8
), which is a slight improvement over two weeks ago when the new behavior hit without any warning under an unchanged version number (0.240.2
) and stayed there for ca. 24 h until it was rolled back as silently as it was introduced.
Yeah, we felt the pain too. Too many main stream changes all rushed in around the same time. V1 executable will be gone from MS hosted agent on 9th July, now DockerCompose@0 will be removed (below message is from the task output)
but yet, DockerCompose@1 isn't made official yet (there was a commit to master branch 3 days ago https://github.com/microsoft/azure-pipelines-tasks/commit/d8e6a2ea34df6114e580b8b7f14413489551f59c)
https://github.com/microsoft/azure-pipelines-tasks/pull/20085 This is the ticket to add DockerComposeV1, I left a message there.
ok, turned out DockerCompose@1 task was released but the commit 3 days ago didn't include docs change. I just tested using DockerCompose@1 in my pipeline and it worked. No more warning message. And the task version number is 1.242.1
ok, just learnt that docker compose v1 executable will be removed on 29th July, giving people time to migration to DockerCompose@1 before @0 gets removed on 24th July, I suppose. It makes sense to redundant devops task before removing the executable, not the other way around.
@sandywangkpmg, @TripleEmcoder, I would like to clarify what is happening here. Initially, we planned to migrate DockerComposeV0 task to the docker compose CLI v2 but there were problems with project names due to constraints for a project name. After that we released the DockerComposeV1 task that uses the docker compose CLI v2, but the DockerComposeV0 task has been rolled back to the docker-compose CLI v1. I agree that was a little messed up and we had a small amount of time to inform users about the new major version of the task. Now we have the mention only in the release notes but I hope that we see an updated documentation about DockerComposeV1 soon. Thanks for understanding.
Related to the tasks changes: As I mentioned above, the DockerComposeV0 task is using compose v1 (if compose v1 is not found the task switches to compose v2) and the DockerComposeV1 task is using compose v2. If you want to use compose v1 in the DockerCompose after it will be removed from the images you can refer to the instructions that helps you to use compose v1 with the DockerComposeV0 task.
Hi everyone!
In my department we have experienced an issue related with the DockerCompose@1 task. The last week we changed pipeline tasks related with te build and push to ACR images, using the DockerCompose@1.
We changed our services docker-compose.yml in order to omit the "version" statement" and begin directly with the service statements.
But we encountered this message from pipeline:
##[error]time="2024-07-24T13:40:37Z" level=warning msg="/home/vsts/agents/3.241.0/.docker-compose.1721828409324.yml:
versionis obsolete"
And the docker-compose.yml seems like this:
What are we missing up?
Edit (2024-07-24 16:05) It seems like task is not using the selected docker-compose.yml that can be selected
Hi everyone!
In my department we have experienced an issue related with the DockerCompose@1 task. The last week we changed pipeline tasks related with te build and push to ACR images, using the DockerCompose@1.
We changed our services docker-compose.yml in order to omit the "version" statement" and begin directly with the service statements.
But we encountered this message from pipeline:
##[error]time="2024-07-24T13:40:37Z" level=warning msg="/home/vsts/agents/3.241.0/.docker-compose.1721828409324.yml:
versionis obsolete"
And the docker-compose.yml seems like this:
What are we missing up?
You're not missing anything, the DockerCompose tasks add in their own docker compose files by default as extra compose files, the task owner would need to update these to also omit the version statements.
Hi everyone! In my department we have experienced an issue related with the DockerCompose@1 task. The last week we changed pipeline tasks related with te build and push to ACR images, using the DockerCompose@1. We changed our services docker-compose.yml in order to omit the "version" statement" and begin directly with the service statements. But we encountered this message from pipeline:
##[error]time="2024-07-24T13:40:37Z" level=warning msg="/home/vsts/agents/3.241.0/.docker-compose.1721828409324.yml:
versionis obsolete"
And the docker-compose.yml seems like this: What are we missing up?You're not missing anything, the DockerCompose tasks add in their own docker compose files by default as extra compose files, the task owner would need to update these to also omit the version statements.
Hi @trs1991! We are using the classic editor (please take a look the image in edit of my last message). How we can achieve omit or prevent DockerCompose task add its own docker compose files?
Thanks in advance
Hi everyone! In my department we have experienced an issue related with the DockerCompose@1 task. The last week we changed pipeline tasks related with te build and push to ACR images, using the DockerCompose@1. We changed our services docker-compose.yml in order to omit the "version" statement" and begin directly with the service statements. But we encountered this message from pipeline:
##[error]time="2024-07-24T13:40:37Z" level=warning msg="/home/vsts/agents/3.241.0/.docker-compose.1721828409324.yml:
versionis obsolete"
And the docker-compose.yml seems like this: What are we missing up?You're not missing anything, the DockerCompose tasks add in their own docker compose files by default as extra compose files, the task owner would need to update these to also omit the version statements.
Hi @trs1991! We are using the classic editor (please take a look the image in edit of my last message). How we can achieve omit or prevent DockerCompose task add its own docker compose files?
Thanks in advance
The short answer is you can't. It's only a warning anyway and won't stop your compose files from building correctly.
New issue checklist
Task name
DockerCompose@0
Task version
0.231.0
Issue Description
Now that the removal of docker compose v1 has begun rolling out as per this GitHub issue
The dockercompose@0 task immediately fails with '##[error]Unhandled: Docker Compose was not found. You can provide the path to docker-compose via 'dockerComposePath' due to using the legacy docker-compose v1 command that no longer exists on the Microsoft hosted agents.
The task needs to be updated to use the newer 'docker compose' v2 command.
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Ubuntu 22.04, Ubuntu 20.04, Windows Server 2019, Windows Server 2022.
Relevant log output
Full task logs with system.debug enabled
Repro steps