This is a basic Docker which just contains (unofficial) RaspberryPi builds of Swift.
- 3.1.0, 3.1.1, latest, 4.1.0, 4.1.2
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.
2018-04-21: The provided 4.1.0 / 4.1.2 builds are now of decent quality and able to run Swift NIO, NIO IRC etc. Thanks go to Marco Chini for providing tarballs!
2018-04-13: Swift 4.0.x or 4.1 is not working properly on Raspi/ARM yet. To keep track of that: https://github.com/helje5/dockSwiftOnARM/issues/1
(there is a 4.1 image containing a build, but that has issues)
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.