From 03d14885778fcb572d4c9c86e81ddc0b7250fda9 Mon Sep 17 00:00:00 2001 From: Sander van Dinten Date: Sun, 13 Dec 2020 11:03:54 +0100 Subject: [PATCH] fixing issue #689 by setting HOME in docker command --- lib/puppet/provider/docker_compose/ruby.rb | 6 +++++- lib/puppet/provider/docker_network/ruby.rb | 6 +++++- lib/puppet/provider/docker_stack/ruby.rb | 6 +++++- lib/puppet/provider/docker_volume/ruby.rb | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/lib/puppet/provider/docker_compose/ruby.rb b/lib/puppet/provider/docker_compose/ruby.rb index 084e6867..6ec85e8c 100644 --- a/lib/puppet/provider/docker_compose/ruby.rb +++ b/lib/puppet/provider/docker_compose/ruby.rb @@ -7,7 +7,11 @@ mk_resource_methods commands dockercompose: 'docker-compose' - commands docker: 'docker' + commands dockercmd: 'docker' + + has_command(:docker, command(:dockercmd)) do + environment(:HOME => '/var/tmp') + end def exists? Puppet.info("Checking for compose project #{name}") diff --git a/lib/puppet/provider/docker_network/ruby.rb b/lib/puppet/provider/docker_network/ruby.rb index cae591ee..668e0c4b 100644 --- a/lib/puppet/provider/docker_network/ruby.rb +++ b/lib/puppet/provider/docker_network/ruby.rb @@ -6,7 +6,11 @@ desc 'Support for Docker Networking' mk_resource_methods - commands docker: 'docker' + commands dockercmd: 'docker' + + has_command(:docker, command(:dockercmd)) do + environment(:HOME => '/var/tmp') + end def network_conf flags = ['network', 'create'] diff --git a/lib/puppet/provider/docker_stack/ruby.rb b/lib/puppet/provider/docker_stack/ruby.rb index e45297ae..4608b0f2 100644 --- a/lib/puppet/provider/docker_stack/ruby.rb +++ b/lib/puppet/provider/docker_stack/ruby.rb @@ -6,7 +6,11 @@ desc 'Support for Puppet running Docker Stacks' mk_resource_methods - commands docker: 'docker' + commands dockercmd: 'docker' + + has_command(:docker, command(:dockercmd)) do + environment(:HOME => '/var/tmp') + end def exists? Puppet.info("Checking for stack #{name}") diff --git a/lib/puppet/provider/docker_volume/ruby.rb b/lib/puppet/provider/docker_volume/ruby.rb index ab1805eb..d0d3342e 100644 --- a/lib/puppet/provider/docker_volume/ruby.rb +++ b/lib/puppet/provider/docker_volume/ruby.rb @@ -6,7 +6,11 @@ desc 'Support for Docker Volumes' mk_resource_methods - commands docker: 'docker' + commands dockercmd: 'docker' + + has_command(:docker, command(:dockercmd)) do + environment(:HOME => '/var/tmp') + end def volume_conf flags = ['volume', 'create']