I am running a few Windows Docker images through a scancode.io pipeline. I noticed that I was getting an error that scancode.io cannot find the installed files of a package from a particular Docker layer.
installed file rootfs_path: /Windows/Microsoft.NET/Framework64/v4.0.30319/1033/CvtResUI.dll
layer rootfs_path: f358be10862ccbc329638b9e10b3d497dd7cd28b0e8c7931b4a545c88d7f7cd6/Windows/Microsoft.NET/Framework64/v4.0.30319/1033/CvtResUI.dll
installed file is missing: /Windows/Microsoft.NET/Framework64/v4.0.30319/1033/CvtResUI.dll
...
In the above example, the proper layer rootfs_path for CvtResUI.dll should be f358be10862ccbc329638b9e10b3d497dd7cd28b0e8c7931b4a545c88d7f7cd6/Files/Windows/Microsoft.NET/Framework64/v4.0.30319/1033/CvtResUI.dll. In Docker Windows layers, the rootfs starts in the Files directory rather than the layer directory itself. InstalledWindowsProgram.populate_installed_files() should be modified to assume that the root_dir passed in is equivalent to the Docker layer directory itself.
I am running a few Windows Docker images through a scancode.io pipeline. I noticed that I was getting an error that scancode.io cannot find the installed files of a package from a particular Docker layer.
In the above example, the proper layer rootfs_path for
CvtResUI.dllshould bef358be10862ccbc329638b9e10b3d497dd7cd28b0e8c7931b4a545c88d7f7cd6/Files/Windows/Microsoft.NET/Framework64/v4.0.30319/1033/CvtResUI.dll. In Docker Windows layers, the rootfs starts in theFilesdirectory rather than the layer directory itself.InstalledWindowsProgram.populate_installed_files()should be modified to assume that theroot_dirpassed in is equivalent to the Docker layer directory itself.