From 6dc0172cd2da47e7066769b6cb480f295bcce673 Mon Sep 17 00:00:00 2001 From: ertaozh Date: Tue, 22 Mar 2016 05:20:28 -0400 Subject: [PATCH] Fix issue 732: Error to process CMD and Entrypoint in Docker life cycle management --- xCAT-server/lib/xcat/plugins/docker.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/docker.pm b/xCAT-server/lib/xcat/plugins/docker.pm index e681c613b..b3f9da7c9 100755 --- a/xCAT-server/lib/xcat/plugins/docker.pm +++ b/xCAT-server/lib/xcat/plugins/docker.pm @@ -592,10 +592,12 @@ sub parse_docker_list_info { } else { $image = $docker_info_hash->{Config}->{'Image'}; - $command = deal_with_space_in_array_entry($docker_info_hash->{Config}->{'Cmd'}); - if (defined($docker_info_hash->{Config}->{'Entrypoint'})) { - $command = deal_with_space_in_array_entry($docker_info_hash->{Config}->{'Entrypoint'}); + my @cmd = (); + push @cmd, $docker_info_hash->{Path}; + if (defined($docker_info_hash->{Args})) { + push @cmd, @{$docker_info_hash->{Args}}; } + $command = deal_with_space_in_array_entry(\@cmd); $names = $docker_info_hash->{'Name'}; $created = $docker_info_hash->{'Created'}; $status = $docker_info_hash->{'State'}->{'Status'};