Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v10 uses docker arguments and options in the wrong order. #984

Open
augustocarvalho opened this issue Jul 8, 2024 · 0 comments
Open

v10 uses docker arguments and options in the wrong order. #984

augustocarvalho opened this issue Jul 8, 2024 · 0 comments
Labels

Comments

@augustocarvalho
Copy link

augustocarvalho commented Jul 8, 2024

Describe the Bug

v10 breaks puppet during the docker compose check if exists.
The argument array is adding the docker options between the -p and project_name.

Commit that added the issue:
https://github.com/puppetlabs/puppetlabs-docker/pull/975/files#diff-0b884d248175f3ad6cf5342c74d8d766c5b6ab28ffdb31f369c614b67b5f36dd

The array has now 5 elements and it inserts in a wrong position (3):
args = ['compose', compose_files, '-p', name, 'config'].insert(3, resource[:options]).compact

#Puppet debug:
Info: Checking for compose project portainer
Debug: Executing: '/usr/bin/docker compose -f /var/docker/portainer/docker-compose.yml -p --project-directory=/var/docker/portainer portainer config'
Error: /Stage[main]/Profiles::System::Docker_server/Apps::Docker::Portainer[portainer]/Apps::Docker::Webapp[portainer]/Apps::Docker::App[portainer]/Docker_compose[portainer]: Could not evaluate: (): could not find expected ':' while scanning a simple key at line 4 column 1
Wrapped exception:
(): could not find expected ':' while scanning a simple key at line 4 column 1

Expected Behavior

Arguments array should insert the docker options after the -p . (Array position is now 4.)
args = ['compose', compose_files, '-p', name, 'config'].insert(4, resource[:options]).compact

Puppet debug:

Info: Checking for compose project portainer
Debug: Executing: '/usr/bin/docker compose -f /var/docker/portainer/docker-compose.yml -p portainer --project-directory=/var/docker/portainer config'

Steps to Reproduce

Declare a docker_compose resource with options (for example --project-directory)

Environment

  • Version 10.0.0
  • Platform Ubuntu 20.04
  • Puppet7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant