Yes, that is totally possible and I would prefer it. You can review my build script here -- joplin-server/build-image.yml at main · etechonomy/joplin-server · GitHub.

I will take a look at yours when I have some time to see if I can contribute.