Is it possible to create predefined OS image or predefined FS layer?

I am trying to automate of building custom RasperryPI image, which includes mounting template image file to loopback filesystem and copying intended files into it. The image file is rather big (6G) and I put it on some hostimg and then copying it to task environment via scp. Unfortunately, the transfer speed is too low and copying takes too long

template.img                                    1%  115MB  95.4KB/s 18:10:00 ET
template.img                                    1%  115MB  95.4KB/s 18:10:09 ET
template.img                                    1%  115MB  96.0KB/s 18:03:59 ET

Is it possible to create some predefined OS image or filesystem overlay to put onto existign image?

Note that I can’t use Docker because it doesn’t support mounting loop devices without privileged mode and CircleCI doesn’t allow this.