You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/swift-container-plugin/Documentation.docc/Swift-Container-Plugin.md
+19-13Lines changed: 19 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,21 +10,20 @@ Build and publish container images using Swift Package Manager.
10
10
11
11
Container images are the standard way to package cloud software today. Once you have packaged your server in a container image, you can deploy it on any container-based public or private cloud service, or run it locally using a desktop container runtime.
12
12
13
-
Swift Container Plugin makes it easy to build container images for servers written in Swift, using Swift Package Manager.
13
+
Use Swift Container Plugin to build and publish container images for your Swift services in one streamlined workflow with Swift Package Manager.
*[How to put Swift in a box](https://fosdem.org/2025/schedule/event/fosdem-2025-5116-how-to-put-swift-in-a-box-building-container-images-with-swift-container-plugin/) at [FOSDEM 2025](https://fosdem.org/2025/schedule/track/swift/).
18
-
*[Swift to the cloud in a single step](https://www.youtube.com/watch?v=9AaINsCfZzw) at [ServerSide.Swift 2024](https://www.serversideswift.info/2024/speakers/euan-harris/).
17
+
1.[Add `swift-container-plugin` to your project's dependencies](doc:Adding-the-plugin-to-your-project) in `Package.swift`.
18
+
2.[Build your project](doc:build) using Swift Package Manager.
19
+
- If you are building on macOS, [use a Swift SDK](doc:requirements) to build a Linux executable.
20
+
- If you are building on Linux, use your native Swift compiler to build a Linux executable. If you have special requirements such as building a static executable, or cross-compiling to a different processor architecture, use a suitable Swift SDK.
21
+
3.`swift-container-plugin` automatically packages your executable in a container image and publishes it to a container registry.
22
+
4.[Run your container image](doc:run) on any container-based platform.
19
23
20
-
###Usage
24
+
## Usage
21
25
22
-
Use the Swift Container Plugin to package an executable product from your Swift package into a container image and publish it to a container registry.
23
-
24
-
To use the plugin:
25
-
-<doc:Adding-the-plugin-to-your-project>
26
-
-<doc:requirements>
27
-
-<doc:authentication>
26
+
Swift Container Plugin can package any executable product defined in `Package.swift`.
You can deploy your service in the cloud, or use a standards-compliant container runtime such as `podman` to run it locally:
58
+
Deploy your service in the cloud, or use a standards-compliant container runtime to run it locally:
60
59
61
60
```
62
61
% podman run -p 8080:8080 registry.example.com/myservice@sha256:a3f75d0932d052dd9d448a1c9040b16f9f2c2ed9190317147dee95a218faf1df
@@ -65,7 +64,14 @@ Trying to pull registry.example.com/myservice@sha256:a3f75d0932d052dd9d448a1c904
65
64
2024-05-26T22:57:50+0000 info HummingBird : [HummingbirdCore] Server started and listening on 0.0.0.0:8080
66
65
```
67
66
68
-
Take a look at some [other examples](https://github.com/apple/swift-container-plugin/tree/main/Examples).
67
+
### Find out more
68
+
69
+
* Take a look at [more examples](https://github.com/apple/swift-container-plugin/tree/main/Examples).
70
+
71
+
* Watch some talks:
72
+
73
+
*[How to put Swift in a box](https://fosdem.org/2025/schedule/event/fosdem-2025-5116-how-to-put-swift-in-a-box-building-container-images-with-swift-container-plugin/) at [FOSDEM 2025](https://fosdem.org/2025/schedule/track/swift/).
74
+
*[Swift to the cloud in a single step](https://www.youtube.com/watch?v=9AaINsCfZzw) at [ServerSide.Swift 2024](https://www.serversideswift.info/2024/speakers/euan-harris/).
0 commit comments