My goal was to publish a binary application written in Swift 4.2 for Vapor 3 to a server running Ubuntu, and have it run like any other server app.
The intended target is an LXD container, though this should work just as well on any Ubuntu VM or other private server from Linode or Digital Ocean.
Here's how I did it.
- Install Ubuntu 18.04 (includes libicu v 60)
- apt install libatomic1
- Download Swift for Ubuntu 18.04 (https://swift.org/builds/swift-4.2.1-release/ubuntu1804/swift-4.2.1-RELEASE/swift-4.2.1-RELEASE-ubuntu18.04.tar.gz)
- archive dynamic libs from swift release /usr/lib/lib* files