We don’t have any VM snapshot features yet. Hopefully sometime this year! The first hack is going to make it very fast to resume a machine, though. Creating entirely new machines from snapshots is more complicated. We may never ship that (we’ll see!)
For what you’re doing, I think you may be better off with Docker tooling. If I understand right, you want to start with an image, shell into it, then run a bunch of commands to make it work like a non-dockerized system.
The docker commit
command will create an image from a container. Which means you can start from scratch with something like this:
docker run --name my-custom-image debian:stable-slim /bin/bash
Then run all the commands you want. Then exit. Then you can run:
docker stop my-custom-image
flyctl auth docker
docker commit my-custom-image registry.fly.io/my-app:build-1234
docker push registry.fly.io/my-app:build-1234
Does that do what you need?
The caveat here is that you need to be running x86 Docker. If you’re running Docker on an m1 Mac, this won’t produce a Docker image you can run on Fly.