As a server-side engineer today, it’s not enough to build a stand-alone executable for your service. You need to wrap it in a container image, ready to run on any standard public or private cloud infrastructure.
In this talk we’ll see that building a container image for your Swift project can be as quick and easy as building a native executable. Using Swift Package Manager plugins and Swift SDKs, we can extend Swift Package Manager, adding a new command tailor-made for wrapping Swift programs in container images:
We’ll see how Swift SDKs can help us to build binaries for several popular Linux distributions, and even build statically-linked binaries with no runtime dependencies. We’ll take a quick look at the contents of the generated container image.Finally, we’ll show how a command plugin ties the whole process together into a single command.
🧑💻 Check out Swift Container Plugin on GitHub. Contributions welcome! - https://github.com/apple/swift-container-plugin