Hi,
You can use the resin build
command of the resin-cli to generate an image for the RPi and then use it as a base image and import it normally with FROM.
https://github.com/resin-io/resin-cli/blob/master/doc/cli.markdown#build-source
Let me point you to a related forum thread: