Closed t089 closed 6 months ago
Found a workaround. Seems like docker cp
does not like symlinks in the SOURCE_DIR
. But there exists a workaround: piping the copy to tar
:
docker cp CONTAINER:/path/in/container - | tar xC $(dirname /path/in/host)
Changing copyFromDockerContainer
, the command succeeds.
func copyFromDockerContainer(
id: String,
from containerPath: FilePath,
to localPath: FilePath,
failIfNotExists: Bool = true
) async throws {
if !failIfNotExists {
guard try await doesPathExist(containerPath, inContainer: id)
else { return }
}
try await Shell.run(
"\(Self.dockerCommand) cp \(id):\(containerPath) - | tar xC $(dirname \(localPath))",
shouldLogCommands: self.isVerbose
)
}
I am trying to build a SDK that includes
libvips
:I created an image:
Then, using the SDK generator:
Fails with: