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/authentication.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,14 @@
1
1
# Set up your registry credentials
2
2
3
-
Configure Swift Container Plugin to authenticate to your container registry
3
+
Configure the plugin to authenticate to your container registry.
4
4
5
5
## Overview
6
6
7
-
Many registries require authentication in order to push images, or even pull them. The plugin can read your registry credentials from a `.netrc` file in your home directory. You can add a netrc record for each registry you need to use, and the plugin will choose the correct one:
7
+
Many container registries require authentication in order to push images, or even pull them.
8
+
The plugin reads your registry credentials from a `.netrc` file in your home directory.
9
+
Add a record into the `.netrc` file for each registry you use, the plugin uses the authentication by the registry you choose.
10
+
11
+
The following example shows placeholder values for the registry `registry.example.com`:
Copy file name to clipboardExpand all lines: Sources/swift-container-plugin/Documentation.docc/build.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,18 @@
2
2
3
3
## Overview
4
4
5
-
`build-container-image`is a command plugin which takes care of building your service, packaging it in a container image and uploading it to a container registry, all in one command:
5
+
The plugin exposes the command `build-container-image` which you invoke to build your service, package it in a container image and upload it to a container registry, in a single command:
6
6
7
7
```shell
8
8
% swift package --swift-sdk x86_64-swift-linux-musl \
* The `--swift-sdk` argument specifies the Swift SDK with which to build the executable. In this case we are using the Static Linux SDK, which was installed earlier, to build an statically-linked x86_64 Linux binary
12
+
* The `--swift-sdk` argument specifies the Swift SDK with which to build the executable. In this case we are using the Static Linux SDK, installed earlier, to build an statically-linked x86_64 Linux binary.
13
13
* The `--from` argument specifies the base image on which our service will run. `swift:slim` is the default, but you can choose your own base image or use `scratch` if your service does not require a base image at all.
14
14
* The `--repository` argument specifies where the plugin will upload our finished image.
15
15
16
-
The plugin needs permission to connect to the network to publish the image to the registry:
16
+
> Note: on macOS, the plugin needs permission to connect to the network to publish the image to the registry.
17
17
18
18
```
19
19
Plugin ‘ContainerImageBuilder’ wants permission to allow all network connections on all ports.
@@ -39,4 +39,5 @@ Build of product 'hello-world' complete! (5.51s)
When it finishes, the plugin prints a reference identifying the new image. Any standard container runtime can use the reference to pull and run your service.
42
+
When the plugin finishes, it prints a reference identifying the new image.
43
+
Any standard container runtime can use the reference to pull and run your service.
Copy file name to clipboardExpand all lines: Sources/swift-container-plugin/Documentation.docc/requirements.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Install a toolchain for cross-compilation (macOS)
1
+
# Install a toolchain for cross-compilation
2
2
3
-
The open source Swift toolchain and a compatible Swift SDK make it possible to build Linux executables on macOS
3
+
Install an open source Swift toolchain and a compatible Swift SDK to build Linux executables on macOS.
4
4
5
5
## Overview
6
6
@@ -20,7 +20,7 @@ If you are running on macOS, you can use a [Swift SDK](https://github.com/apple/
20
20
* Install the [Static Linux SDK from swift.org](https://www.swift.org/documentation/articles/static-linux-getting-started.html)
21
21
* Use [Swift SDK Generator](https://github.com/apple/swift-sdk-generator) to build and install a custom SDK
22
22
23
-
Let's install the Swift Static Linux SDK:
23
+
The following example illustrates installing the Swift Static Linux SDK:
24
24
```
25
25
% swift sdk install https://download.swift.org/swift-6.1-release/static-sdk/swift-6.1-RELEASE/swift-6.1-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz --checksum 111c6f7d280a651208b8c74c0521dd99365d785c1976a6e23162f55f65379ac6
26
26
Downloading a Swift SDK bundle archive from `https://download.swift.org/swift-6.1-release/static-sdk/swift-6.1-RELEASE/swift-6.1-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz`...
@@ -35,7 +35,7 @@ Swift SDK bundle at `https://download.swift.org/swift-6.1-release/static-sdk/swi
35
35
Swift SDK bundle at `https://download.swift.org/swift-6.1-release/static-sdk/swift-6.1-RELEASE/swift-6.1-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz` successfully installed as swift-6.1-RELEASE_static-linux-0.0.1.artifactbundle.
36
36
```
37
37
38
-
Check that the new Swift SDK is now available:
38
+
After the installation is complete, check that the SDK is available:
0 commit comments