Coder Social home page Coder Social logo

[BUG]: DockerCompose@0 no longer functions after removal of Docker Compose v1 from hosted agents. about azure-pipelines-tasks HOT 18 OPEN

trs1991 avatar trs1991 commented on September 26, 2024 16
[BUG]: DockerCompose@0 no longer functions after removal of Docker Compose v1 from hosted agents.

from azure-pipelines-tasks.

Comments (18)

cgraf-spiria avatar cgraf-spiria commented on September 26, 2024 16

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: #17808

from azure-pipelines-tasks.

fbuser1 avatar fbuser1 commented on September 26, 2024 14

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'

from azure-pipelines-tasks.

benlings avatar benlings commented on September 26, 2024 8

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 #16361

from azure-pipelines-tasks.

SwapnaVersion1 avatar SwapnaVersion1 commented on September 26, 2024 4

Can we have updates on this? As Docker@0 is deprecating in July. Can we start using Docker@2 in our ADO tasks?

from azure-pipelines-tasks.

alpapad01 avatar alpapad01 commented on September 26, 2024 2

docker-compose is deprecated. The functionality is provided by docker command itself. the command should be :

docker, with arguments compose ... rest of args

from azure-pipelines-tasks.

sandywangkpmg avatar sandywangkpmg commented on September 26, 2024 1

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? image

There is no DockerCompose@1 or @2 version, only @0 is available. image 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. image

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.

from azure-pipelines-tasks.

laurencenairne-work avatar laurencenairne-work commented on September 26, 2024

@fbuser1, would this not solve the problem for you without needing to rename and repath everything?

from azure-pipelines-tasks.

peruzzof avatar peruzzof commented on September 26, 2024

My company is facing the same. Could the task be adjusted to support docker compose v2?

from azure-pipelines-tasks.

alpapad01 avatar alpapad01 commented on September 26, 2024

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....

from azure-pipelines-tasks.

Jacko1394 avatar Jacko1394 commented on September 26, 2024

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

from azure-pipelines-tasks.

sandywangkpmg avatar sandywangkpmg commented on September 26, 2024

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.
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.

from azure-pipelines-tasks.

ashishbhatt-afk avatar ashishbhatt-afk commented on September 26, 2024

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?
image

from azure-pipelines-tasks.

sandywangkpmg avatar sandywangkpmg commented on September 26, 2024

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? image

There is no DockerCompose@1 or @2 version, only @0 is available.
image
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.
image

from azure-pipelines-tasks.

trs1991 avatar trs1991 commented on September 26, 2024

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? image

There is no DockerCompose@1 or @2 version, only @0 is available. image 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. image

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.

from azure-pipelines-tasks.

SwapnaVersion1 avatar SwapnaVersion1 commented on September 26, 2024

What is the work-around? Our organisation pipelines would fail after July once @1 docker compose is deprecated.

from azure-pipelines-tasks.

sandywangkpmg avatar sandywangkpmg commented on September 26, 2024

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.
#19711 (comment)

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. 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.

from azure-pipelines-tasks.

alec-pinson avatar alec-pinson commented on September 26, 2024

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

from azure-pipelines-tasks.

sandywangkpmg avatar sandywangkpmg commented on September 26, 2024

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.
actions/runner-images#9692

from azure-pipelines-tasks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.