Why don't you try to just clone your MBP's hard drive to the iMac?
#26
(You just need a fitting FireWire-cable, which is quite handy to have anyway ...)
1. Start the iMac in TargetDiskMode "TDM" (hold T-key on booting)
2. Connect your Macbook to the iMac using the FireWire cable. The iMac's HDD will appear at a FireWire-connected drive in Finder or on your desktop.
3. Run DiskUtility and erase the iMacs HDD (MacOS Extended Journaled)
4. Download a copy of SuperDuper! and run it in Trial-Mode.
5. Use SuperDuper! to clone Your MacBook's HDD to the iMac's HDD
Alternative route (needs either a FireWire-Cable or a 16GB-USB-Stick) but the iMac better happens to have an SSD for that ... :
1. Download & launch
HighSierra-Patcher-App (or alternatively Mojave)
2. Download MacOS-HighSierra-Installer through the HighSierraPatcher-App
3. Create the Patcher_HighSierra-Installer through the HighSierraPatcherApp:
a) install onto the USB-Stick
b) install onto a tiny 12GB-partition at the very end of your iMacs hard drive: In order to achieve that, the iMac has to be booted into "TDM" (see above) and has to be connected to the MacBook via FireWire-Cable. So the iMacs HDD is mounted at the MacBook. Then run DiskUtility, erase the iMac's HDD and run the partitioning-task to create that tiny 12GB partition at the very end of the drive. After that run the HighSierraPathcher-App and install the patched macOS-HighSierra-Installer onto that tiny partition.
4. Boot the iMac from a) the USB-stick or b) from the tiny PatcherPartition and install HighSierra onto the iMac HDD's first partition.
5. After finishing the installation reboot the iMac again from a) or b) and run the patching procedure (which is BTW a no-brainer)
6. Reboot into the iMacs HDD. If you chose option b) you'll always have the patcher-recovery at hands and you don't need the USB-stick for maintenance.