Skip to content

Commit 65bf91f

Browse files
committed
Images for Linux doc update
1 parent 7330310 commit 65bf91f

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

Sources/SPIManifest/Documentation.docc/CommonUseCases.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,29 +74,33 @@ There is also a `target:` key in order to configure a specific target instead of
7474

7575
Package authors can also use the `.spi.yml` file to configure custom docker base images for our Linux builds.
7676

77-
We build packages for Linux with docker commands using the official Swift docker images:
77+
We build packages for Linux with docker commands using our own images based on the official Swift docker images:
7878

7979
```bash
80-
docker run --rm -v "$PWD":/host -w /host swift:5.7 swift build
80+
docker run --rm -v "$PWD":/host -w /host registry.gitlab.com/finestructure/spi-images:basic-5.8-latest swift build
8181
```
8282

83-
Some packages however have additional operating system level dependencies that the official Swift images do not provide.
83+
Our default image comes with a few dependencies pre-installed which you can review via its [`Dockerfile`](https://gitlab.com/finestructure/spi-images/-/blob/main/Dockerfile).
8484

85-
If this is the case for your package, you can use our [images derived from the official Swift docker images](https://gitlab.com/finestructure/spi-images/-/blob/main/Dockerfile), which include some common Linux packages.
85+
There might also be other, more specialised `Dockerfiles` that match your dependencies, for example [`Dockerfile.AppKid`](https://gitlab.com/finestructure/spi-images/-/blob/main/Dockerfile.AppKid). It may be worth reviewing the `Dockerfile`s in the [`spi-images` repository for matches](https://gitlab.com/finestructure/spi-images/-/tree/main).
8686

87-
Here's an example:
87+
As mentioned above, we are referencing the basic image by default, so if `Dockerfile` matches your requirements you do not need to add an `image:` clause to your `.spi.yml` file at all.
88+
89+
If you would like to reference a specialized `Dockerfile`, like for instance `Dockerfile.AppKid`, use the following `image:` clause:
8890

8991
```yaml
9092
version: 1
9193
builder:
9294
configs:
9395
- platform: linux
94-
swift_version: '5.5'
95-
image: registry.gitlab.com/finestructure/spi-images:basic-5.5-latest
96-
- platform: linux
97-
swift_version: '5.6'
98-
image: registry.gitlab.com/finestructure/spi-images:basic-5.6-latest
96+
swift_version: '5.8'
97+
image: registry.gitlab.com/finestructure/spi-images:AppKid-5.8-latest
9998
```
10099

101-
If your requirements are not included, please [open an issue](https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/issues/new/choose).
100+
Effectively, the image name is based on the `Dockerfile` suffix:
101+
102+
```
103+
registry.gitlab.com/finestructure/spi-images:${SUFFIX}-5.8-latest
104+
```
102105

106+
If your package requires additional dependencies not covered by any of the existing images, please [open an issue](https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/issues/new/choose) so that we can either add them to the basic image if they are of a general nature or create a new specialized image.

0 commit comments

Comments
 (0)