For a trap place a singular metal platform and put a lightpet or dodo underneath and put the eggs on top of the platform. The basilisk will target the lightpet and can't burrow since it will be on the platform. Just don't take the basilisk aggro off the lightpet and you'll be fine.
Seems like raising a rock drake 1st will help you tame these. 1st raise a drake. 2nd collect a bunch of rock drake eggs. 3rd find a basilisk and while riding the cloaked drake drop the eggs one by one and it will eat them.
Actually the Basilisk only eats Rock Drake fertilized eggs. The wiki says that it should also eat other fertilized eggs, but currently it ignore them. Probably it's a bug, for now feed it Rock Drake eggs