This is a basic Docker which just contains (unofficial) RaspberryPi builds of Swift.
- 3.1.0, 3.1.1, latest
How to run
An easy way to get Docker running on a RaspberryPi is the Hypriot image, here is a quick howto.
If you want to remote-control the Raspi from your mac, there is a howto for that as well.
Once you got Docker running, you can do a simple:
docker run --rm helje5/rpi-swift swift --version Swift version 3.1 (swift-3.1-RELEASE) Target: armv7-unknown-linux-gnueabihf
Note: Swift REPL does not work on ARM. Swift Package Manager etc. now do.
Simple stuff like invoking
swift --version also works on Docker-for-Mac w/ QEmu. That is you can run the
rpi-swift image using Docker-for-Mac w/o an actual Raspberry Pi! Other things do not work in QEmu, including SwiftPM.
This is a very basic image w/ just Swift. There is another image helje5/rpi-swift-dev which comes with dev tools installed. You probably want to use that if you want to build Swift packages.
There is also a demo image which shows how to run Apache Modules written in Swift on a Raspi,
checkout: Running Server Side Swift on RaspberryPi .
Checkout https://github.com/helje5/dockSwiftOnARM for more information.