Control order images are built in

We have a repository, where sometimes it matters that it builds the images in the right order…

I.e. the Xdebug enabled ones for dev are based on the non Xdebug versions, so the Xdebug enabled ones need to be built last otherwise they get based on an earlier parent image.

Is this possible?