Skip to content

docker-compose download URL is incorrect in versions 2+ due to capitalized "Linux" fact #909

Open
@akomakom

Description

@akomakom

Describe the Bug

Class docker::compose silently fails to download/install the binary (file contains the string "Not Found").

Expected Behavior

docker::compose should install docker-compose binary to /usr/local/bin/

Steps to Reproduce

Steps to reproduce the behavior:

  1. Install latest version of puppetlabs-docker (6.0.2)
  2. Add class {'docker::compose': version => '2.6.0'} in a host manifest
  3. Apply manifest
  4. Check contents of /usr/local/bin/docker-compose-[VERSION] (Mine contains the string "Not Found")
  5. Try puppet agent -td, download URL is printed:
Debug: Executing: 'curl -s -S -L  https://github.com/docker/compose/releases/download/2.6.0/docker-compose-Linux-x86_64 -o /usr/local/bin/docker-compose-2.6.0'
Notice: /Stage[main]/Docker::Compose/Exec[Install Docker Compose 2.6.0]/returns: executed successfully (corrective)

Note that no error is raised. Linux is uppercase.

Environment

  • Version 6.0.2
  • Puppet 7.24
  • Platform CentOS 7, Rocky 8, Ubuntu 22, etc

Additional Context

The download URL is built using ${::kernel}, which resolves to Linux on all my systems. The correct URL string would be linux (lowercase).

Additionally, the v prefix seems to apear in 2+ versions, although that can be passed in the parameter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions