maybe I didn’t understand the question. But you can specify for each service either build instruction or image instructions. Like this:
services:
redis:
image: redis:latest
will pull image. If it’s already on your machine it will not go and try to fetch it