Skip to content

Error: Could not find a suitable provider for docker_compose #742

Closed
@marrajo-afk

Description

@marrajo-afk

Describe the Bug

When use classes docker and docker::compose in an own class (lamp) , the first puppet agent execution failed with:
Error: Could not find a suitable provider for docker_compose

It only works when the docker-ce package is installed manually in the node before the first puppet agent is run in it.

lamp/init.pp:
include docker
include docker::compose

Class['docker::compose'] ->
Class['docker'] ->
File['docker-compose'] ->
Docker_compose['lamp']

file { "docker-compose":
name => "/var/pr1/docker-compose.yml",
replace => true,
content => template("lamp/docker-compose.erb"),
notify => Docker_Compose['lamp']
}
docker_compose { 'lamp':
compose_files => ['/var/pr1//docker-compose.yml'],
ensure => present,
}

If i change the order of execution, the result is the same, i.e:
Class['docker'] ->
Class['docker::compose'] ->
....
....

docker/manifest/params.pp:
$compose_install_path = '/usr/bin'
$compose_version = '1.29.1'

After the failed execution, both docker-compose executable and docker-ce packages are correctly installed

Expected Behavior

Correct execution of docker_compose Resource Type

Environment

Puppet master:
Foreman 2.2
Debian 10
module puppetlabs-docker (v4.0.0)
Puppet v7.5.0

Agent:
Debian10
Puppet v7.5.0

Thanks.

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