Pre-pandemic I was building a new EV charging kiosk experience on Raspberry Pi industrial hardware using Swift in Docker (actually, Balena). Build times were a little long at the time, due to the RPi CPU speed and Swift’s compiler. But there were a surprising amount of hardware drivers available for things.
Also key were these Docker images: https://github.com/wlisac/swift-on-balena