{"id":13667126,"url":"https://github.com/wlisac/swift-on-balena","last_synced_at":"2025-07-06T07:03:16.247Z","repository":{"id":35849007,"uuid":"180648902","full_name":"wlisac/swift-on-balena","owner":"wlisac","description":"Docker images for Swift on Raspberry Pi and other ARM devices from balena's base images.","archived":false,"fork":false,"pushed_at":"2021-12-08T21:03:30.000Z","size":186,"stargazers_count":174,"open_issues_count":2,"forks_count":8,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-09-28T10:21:18.661Z","etag":null,"topics":["aarch64","armv6","armv7","armv8","balena","balenacloud","docker","iot","raspberry-pi-3","raspberry-pi-zero","raspberrypi","swift"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wlisac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-10T19:21:24.000Z","updated_at":"2024-03-04T04:42:52.000Z","dependencies_parsed_at":"2022-09-25T04:30:59.845Z","dependency_job_id":null,"html_url":"https://github.com/wlisac/swift-on-balena","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlisac%2Fswift-on-balena","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlisac%2Fswift-on-balena/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlisac%2Fswift-on-balena/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlisac%2Fswift-on-balena/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wlisac","download_url":"https://codeload.github.com/wlisac/swift-on-balena/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219864036,"owners_count":16555943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aarch64","armv6","armv7","armv8","balena","balenacloud","docker","iot","raspberry-pi-3","raspberry-pi-zero","raspberrypi","swift"],"created_at":"2024-08-02T07:00:32.207Z","updated_at":"2024-10-11T02:02:44.065Z","avatar_url":"https://github.com/wlisac.png","language":"Dockerfile","funding_links":[],"categories":["Single Board Computers","Dockerfile"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"Assets/logo.svg\"\u003e\n\u003c/p\u003e\n\n# Swift on Balena\n\n\u003cp\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Swift-4 | 5-orange.svg\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/architectures-ARMv6 | ARMv7 | ARMv8-lightgray.svg\" /\u003e\n    \u003ca href=\"https://twitter.com/wlisac\"\u003e\u003cimg src=\"https://img.shields.io/badge/twitter-@wlisac-blue.svg\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://launchpass.com/swift-arm\"\u003e\u003cimg src=\"https://img.shields.io/badge/slack-swift--arm-purple.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nWelcome to **Swift on Balena** – a set of Docker images for Swift on Raspberry Pi and other ARM devices. These images are based on [balena's IoT focused Docker images](https://www.balena.io/docs/reference/base-images/base-images/) and make it easy to build and run Swift apps on ARM. \n\n## Getting Started\n\nUse this [sample project](https://github.com/wlisac/balena-swift-hello-world) to get started with Swift and Docker on your Raspberry Pi.\n\n\n## Latest Releases\n\n### Device Based Images\nDevice based images are a great way to get started with Swift on a specific device type.\n\n| Device                                | Architecture | Swift | Docker Image                                                                                             |\n|---------------------------------------|--------------|-------|----------------------------------------------------------------------------------------------------------|\n| Raspberry Pi (v1 or Zero)             | armv6        | 5.1   | [`wlisac/raspberry-pi-swift:5.1-build`](https://hub.docker.com/r/wlisac/raspberry-pi-swift/tags)         |\n| Raspberry Pi Zero 2 W\u003cbr\u003e(64-bit OS) | aarch64      | 5.5.1 | [`wlisac/raspberrypi0-2w-64-swift:5.5.1-build`](https://hub.docker.com/r/wlisac/raspberrypi0-2w-64-swift/tags)         |\n| Raspberry Pi 2                        | armv7hf      | 5.1   | [`wlisac/raspberry-pi2-swift:5.1-build`](https://hub.docker.com/r/wlisac/raspberry-pi2-swift/tags)       |\n| Raspberry Pi 3                        | armv7hf      | 5.1   | [`wlisac/raspberrypi3-swift:5.1-build`](https://hub.docker.com/r/wlisac/raspberrypi3-swift/tags)         |\n| Raspberry Pi 3 (64-bit OS)            | aarch64      | 5.5.1 | [`wlisac/raspberrypi3-64-swift:5.5.1-build`](https://hub.docker.com/r/wlisac/raspberrypi3-64-swift/tags)   |\n| Raspberry Pi 4 (64-bit OS)            | aarch64      | 5.5.1 | [`wlisac/raspberrypi4-64-swift:5.5.1-build`](https://hub.docker.com/r/wlisac/raspberrypi4-64-swift/tags)   |\n| Generic ARMv7-a HF                    | armv7hf      | 5.1   | [`wlisac/generic-armv7ahf-swift:5.1-build`](https://hub.docker.com/r/wlisac/generic-armv7ahf-swift/tags) |\n| Generic AARCH64 (ARMv8)               | aarch64      | 5.5.1 | [`wlisac/generic-aarch64-swift:5.5.1-build`](https://hub.docker.com/r/wlisac/generic-aarch64-swift/tags)   |\n\n### Architecture Based Images\nArchitecture based images are useful when building an image for multiple device types with a common architecture.\n\n| Device                                                                                          | Architecture | Swift | Docker Image                                                                           |\n|-------------------------------------------------------------------------------------------------|--------------|-------|----------------------------------------------------------------------------------------|\n| Raspberry Pi (v1 or Zero)                                                                       | armv6        | 5.1   | [`wlisac/rpi-swift:5.1-build`](https://hub.docker.com/r/wlisac/rpi-swift/tags)         |\n| Raspberry Pi 2\u003cbr\u003eRaspberry Pi 3\u003cbr\u003eGeneric ARMv7-a HF                                          | armv7hf      | 5.1   | [`wlisac/armv7hf-swift:5.1-build`](https://hub.docker.com/r/wlisac/armv7hf-swift/tags) |\n| Raspberry Pi Zero 2 W (64-bit OS)\u003cbr\u003eRaspberry Pi 3 (64-bit OS)\u003cbr\u003eRaspberry Pi 4 (64-bit OS)\u003cbr\u003eGeneric AARCH64 (ARMv8)             | aarch64      | 5.5.1 | [`wlisac/aarch64-swift:5.5.1-build`](https://hub.docker.com/r/wlisac/aarch64-swift/tags) |\n\n## Image Variants\n\nThere are several image variants available depending on hardware, Linux distribution, and Swift version.\n\n- Devices\n    - Raspberry Pi (v1 or Zero)\n    - Raspberry Pi Zero 2 W (64-bit OS)\n    - Raspberry Pi 2\n    - Raspberry Pi 3\n    - Raspberry Pi 3 (64-bit OS)\n    - Raspberry Pi 4 (64-bit OS)\n    - Generic ARMv7-a HF\n    - Generic AARCH64 (ARMv8)\n- Linux Distributions\n    - Debian: Stretch\n    - Ubuntu: Bionic and Xenial\n- Swift Versions\n    - Swift 4 (`4.2.3`)\n    - Swift 5 (`5.5.1`, `5.1`, `5.0.1`, `5.0`)\n- `build` and `run` image variants for [multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/)\n\n### Image Naming Scheme\n\nThe image naming scheme for Swift on Balena supports a subset of [balena's image naming scheme](https://www.balena.io/docs/reference/base-images/base-images/#how-the-image-naming-scheme-works) and follows the pattern below.\n\n```plain\nwlisac/\u003chardware\u003e-\u003cdistro\u003e-swift:\u003cswift_version\u003e-\u003cdistro_version\u003e-(build|run)\n```\n\n#### Image Names\n\n- `\u003chardware\u003e` is either the device type or architecture and is required. See the [device list](Documentation/Device%20List.md) for available device names and architecture names.\n- `\u003cdistro\u003e` is the Linux distribution. This is optional and will usually default to Debian, but may fall-back to Ubuntu if a Debian variant is not available.\n\n#### Image Tags\n\n- `\u003cswift_version\u003e` is the version of Swift and is required.\n- `\u003cdistro_version\u003e` is the version of the Linux distribution and is required if a distribution is specified in the image name.\n- `(build|run)` specifies either the `build` or `run` image variant and is required. The `build` variant includes the Swift compiler, Swift Package Manager, and other tools needed to build and run a Swift app from source. The `run` variant is much lighter-weight, does not include the Swift compiler, and is designed to run an already built Swift app. The `build` and `run` image variants can be used together in a [multi-stage Dockerfile](https://github.com/wlisac/balena-swift-hello-world/blob/b439fddbbda93019ed8747d249efc9fc8bb4c4c7/Dockerfile.raspberrypi3) to produce a smaller image that's ready for deployment.\n\n#### Examples\n\n`wlisac/raspberrypi3-swift:5.1-build`\n\n- `\u003chardware\u003e`: raspberrypi3 – the Raspberry Pi 3 device type\n- `\u003cdistro\u003e`: omitted – defaulted to Debian\n- `\u003cswift_version\u003e`: 5.1 – specifies Swift version 5.1\n- `\u003cdistro_version\u003e`: omitted – defaulted to Stretch\n- `(build|run)`: build – specifies the `build` variant for building a Swift app from source\n\n`wlisac/raspberrypi3-ubuntu-swift:4.2.3-bionic-run`\n\n- `\u003chardware\u003e`: raspberrypi3 – the Raspberry Pi 3 device type\n- `\u003cdistro\u003e`: ubuntu\n- `\u003cswift_version\u003e`: 4.2.3 – specifies Swift version 4.2.3\n- `\u003cdistro_version\u003e`: bionic – Ubuntu 18.04\n- `(build|run)`: run – specifies the `run` variant for running an already built Swift app\n\n`wlisac/armv7hf-swift:5.1-build`\n\n- `\u003chardware\u003e`: armv7hf – the armv7hf architecture type\n- `\u003cdistro\u003e`: omitted – defaulted to Debian\n- `\u003cswift_version\u003e`: 5.1 – specifies Swift version 5.1\n- `\u003cdistro_version\u003e`: omitted – defaulted to Stretch\n- `(build|run)`: build – specifies the `build` variant for building a Swift app from source\n\n## Acknowledgments\n\nSwift on Balena is possible because of the amazing work done by the Swift on ARM community and the projects below.\n\n- [uraimo/buildSwiftOnARM](https://github.com/uraimo/buildSwiftOnARM)\n- [futurejones/swift-arm64](https://github.com/futurejones/swift-arm64)\n- [helje5/dockSwiftOnARM](https://github.com/helje5/dockSwiftOnARM)\n\nJoin the community in the [swift-arm](https://launchpass.com/swift-arm) Slack channel.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwlisac%2Fswift-on-balena","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwlisac%2Fswift-on-balena","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwlisac%2Fswift-on-balena/lists"}