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
<!--- Provide a general summary of your changes in the Title above -->
## Issue \#
<!--- If it fixes an issue, please link to the issue here -->
#644
## Description of changes
<!--- Why is this change required? What problem does it solve? -->
- Added `--container-cli` option to the archive SwiftPM plugin so users
can choose Docker (default) or Apple container
- Implemented Apple container support by switching pull/run commands to
`container image pull` and `container run`
- Documented the Apple container path in readme.md
- swift test passed
## New/existing dependencies impact assessment, if applicable
<!--- No new dependencies were added to this change. -->
<!--- If any dependency was added / modified / removed,
THIRD-PARTY-LICENSES must be updated accordingly. -->
N/A
## Conventional Commits
<!--- Please use conventional commits to let us know what kind of change
this is.-->
<!--- More info can be found here:
https://www.conventionalcommits.org/en/v1.0.0/-->
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
---------
Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>
Copy file name to clipboardExpand all lines: readme.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Swift AWS Lambda Runtime was designed to make building Lambda functions in Swift
35
35
36
36
- When developing on macOS, be sure you use macOS 15 (Sequoia) or a more recent macOS version.
37
37
38
-
- To build and archive your Lambda function, you need to [install docker](https://docs.docker.com/desktop/install/mac-install/).
38
+
- To build and archive your Lambda function, you need to install [docker](https://docs.docker.com/desktop/install/mac-install/) or Apple [container](https://github.com/apple/container).
39
39
40
40
- To deploy the Lambda function and invoke it, you must have [an AWS account](https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-creating.html) and [install and configure the `aws` command line](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
41
41
@@ -137,6 +137,18 @@ The runtime comes with a plugin to compile on Amazon Linux and create a ZIP arch
137
137
swift package archive --allow-network-connections docker
138
138
```
139
139
140
+
By default, it runs on `docker` but it also allows you to build with [Apple container](https://github.com/apple/container) (it requires disabling the sandbox):
141
+
142
+
```bash
143
+
# Both --disable-sandbox and
144
+
# --allow-network-connections are required
145
+
# until https://github.com/swiftlang/swift-package-manager/issues/9763 is fixed
146
+
swift package --disable-sandbox \
147
+
--allow-network-connections docker \
148
+
archive \
149
+
--container-cli container
150
+
```
151
+
140
152
If there is no error, the ZIP archive is ready to deploy.
141
153
The ZIP file is located at `.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/MyLambda/MyLambda.zip`
0 commit comments