2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Fix issue 732: Error to process CMD and Entrypoint in Docker life cycle management

This commit is contained in:
ertaozh 2016-03-22 05:20:28 -04:00
parent 13bd9b6f9f
commit 6dc0172cd2

View File

@ -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'};