Is caching build artifacts possible when deploying with docker remotely?

When deploying from a computer that doesn’t have docker installed, fly-io will build the docker image on its own server, and it downloads & rebuilds all dependencies’ sources from scratch every time, which takes a long time.
Is there a way to cache the build artifacts between deploys / rebuilds of the docker image?
So that only the main app has to be built again, not its dependencies?

I would really appreciate if someone can shed some light on this :slight_smile:
Would it be possible with something like --mount=type=cache,target=/app/target?