Skip to content

Commit 4378355

Browse files
authored
fix #609 : [plugin] Update the README and the doc to mention potential credentials error when using the plugin. (#610)
## Description Adds documentation for Docker credential store errors that users may encounter when running `swift package archive --allow-network-connections docker`. ## Changes - Added a note in `readme.md` explaining how to resolve Docker credential store errors - Added a note in `Sources/AWSLambdaRuntime/Docs.docc/Deployment.md` with the same guidance ## Problem Users may encounter authentication errors when the Swift package plugin attempts to pull Docker images, particularly when Docker is configured with a credential store (e.g., `docker-credential-desktop`). This issue is documented in #609. ## Solution The documentation now provides two workarounds: 1. Remove the `credsStore` entry from `~/.docker/config.json` 2. Use the `--disable-sandbox` flag with the archive command Both notes link to issue #609 for additional context and discussion. ## Related Issue Fixes #609
1 parent 2abe7eb commit 4378355

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Sources/AWSLambdaRuntime/Docs.docc/Deployment.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ Here is the content of this guide:
7373
>[!NOTE]
7474
> When building on Linux, your current user must have permission to use docker. On most Linux distributions, you can do so by adding your user to the `docker` group with the following command: `sudo usermod -aG docker $USER`. You must log out and log back in for the changes to take effect.
7575
76+
>[!NOTE]
77+
> If you encounter Docker credential store errors during the build, remove the `credsStore` entry from your `~/.docker/config.json` file or disable the plugin sandbox with `--disable-sandbox`. See [issue #609](https://github.com/awslabs/swift-aws-lambda-runtime/issues/609) for details.
78+
79+
80+
7681
### Choosing the AWS Region where to deploy
7782

7883
[AWS Global infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/) spans over 34 geographic Regions (and continuously expanding). When you create a resource on AWS, such as a Lambda function, you have to select a geographic region where the resource will be created. The two main factors to consider to select a Region are the physical proximity with your users and geographical compliance.

readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ swift package archive --allow-network-connections docker
140140
If there is no error, the ZIP archive is ready to deploy.
141141
The ZIP file is located at `.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/MyLambda/MyLambda.zip`
142142

143+
>[!NOTE]
144+
> If you encounter Docker credential store errors during the build, remove the `credsStore` entry from your `~/.docker/config.json` file or disable the plugin sandbox with `--disable-sandbox`. See [issue #609](https://github.com/awslabs/swift-aws-lambda-runtime/issues/609) for details.
145+
143146
5. Deploy to AWS
144147

145148
There are multiple ways to deploy to AWS ([SAM](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html), [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started), [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html), [AWS Console](https://docs.aws.amazon.com/lambda/latest/dg/getting-started.html)) that are covered later in this doc.

0 commit comments

Comments
 (0)