I have a Ubuntu22 based Docker with a lot of extra content to create a flashable image of, say, X Embedded OS. Let's call it docker#1. We have a local docker for our needs, let's call it docker#2, and using extra content doesn't work for us. So I need to take only what is related to creating an X OS image from docker#1 and add it to docker#2. How do I do that? What is the approach to this separation? How do I know what to keep and what to add?
I'm expecting for advices from professional dockers.