Skip to content

Provides a way to setup docker-compose at a specific version

Open

Description

Is your feature request related to a problem? Please describe.
Yes, the current problem is the lack of ability to specify a Docker Compose version within GitHub Actions. Currently, when setting up environments that require Docker Compose in GitHub Actions, it defaults to using the version that comes pre-installed on the GitHub runners. This can lead to inconsistencies and unexpected behavior in CI/CD pipelines, especially when the latest Docker Compose versions introduce breaking changes or when specific features of a certain Docker Compose version are needed. I find this frustrating because it forces our projects to adapt to the pre-installed Docker Compose version, rather than allowing us to specify the version that matches our development environments, leading to "it works on my machine" issues.

Describe the solution you'd like
I would like a feature in the GitHub Actions setup where you can specify the version of Docker Compose to use in your workflows. Ideally, this would be a simple field or parameter in the GitHub Actions YAML configuration file where the desired Docker Compose version can be defined. For example:

steps:
  - name: Setup Docker Compose
    uses: docker/setup-compose-action@v1
    with:
      version: '1.29.2'

This solution would ensure that every run of the GitHub Actions workflow uses the specified Docker Compose version, leading to more predictable and consistent builds.

Describe alternatives you've considered
An alternative solution I've considered is manually installing the desired Docker Compose version at the beginning of each workflow run. This can be achieved by running shell commands within the GitHub Actions workflow to uninstall the pre-installed version of Docker Compose and then download and install the specific version needed. However, this approach is cumbersome, error-prone, and increases the complexity of the CI/CD pipeline configuration. It also introduces additional overhead in terms of maintenance and execution time.

Additional context
Being able to specify the Docker Compose version directly in GitHub Actions workflows would greatly enhance the flexibility and reliability of CI/CD pipelines, especially for projects that rely on specific Docker Compose features or face compatibility issues with newer versions. This feature would align with the principle of infrastructure as code, allowing teams to define and control their CI/CD environments more precisely and transparently.

Inspiration: https://github.com/ndeloof/install-compose-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions