Generate valid container id in fake docker client.

This commit is contained in:
Yu-Ju Hong
2017-02-28 12:54:51 -08:00
parent c713ef434d
commit 1759b87ffe
7 changed files with 159 additions and 182 deletions

View File

@@ -217,7 +217,7 @@ func (ds *dockerService) createContainerLogSymlink(containerID string) error {
if err != nil {
return fmt.Errorf("failed to get container %q log path: %v", containerID, err)
}
if path != "" {
if path != "" && realPath != "" {
// Only create the symlink when container log path is specified.
if err = ds.os.Symlink(realPath, path); err != nil {
return fmt.Errorf("failed to create symbolic link %q to the container log file %q for container %q: %v",