You can use the following command in a cheats-enabled world of Minecraft to get unlimited dragon eggs: /give @s minecraft:dragon_egg