2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

Merge pull request #828 from zet809/fix_issue_732

Fix issue 732: Error to process CMD and Entrypoint in Docker life cyc…
This commit is contained in:
Xiaopeng Wang 2016-03-22 18:35:34 +08:00
commit 4a340b3a84

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