Skip to content

Commit 495c5a3

Browse files
authored
generator: --from-container-image implies --with-docker (#174)
If --from-container-image is specified without --with-docker, the generator builds an SDK from Debian packages, completely ignoring the user's clear intent to build from a container image. For now, we can assume that a user who specifies --from-container-image also wants to use a container runtime. In future we might be able to support extracting container images without the need for a runtime. If that happens, we can stop assuming --with-docker and commands which only specify --from-container-image will continue to work, so scripts and documentation won't need to be changed.
1 parent 7a833f3 commit 495c5a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ swift run swift-sdk-generator make-linux-sdk --with-docker --linux-distribution-
125125
You can also specify the base container image by name:
126126

127127
```
128-
swift run swift-sdk-generator make-linux-sdk --with-docker --from-container-image swift:5.9-jammy
128+
swift run swift-sdk-generator make-linux-sdk --from-container-image swift:5.9-jammy
129129
```
130130

131131
```

Sources/SwiftSDKGenerator/SwiftSDKRecipes/LinuxRecipe.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public struct LinuxRecipe: SwiftSDKRecipe {
6666
if let targetSwiftPackagePath {
6767
targetSwiftSource = .localPackage(FilePath(targetSwiftPackagePath))
6868
} else {
69-
if withDocker {
69+
if withDocker || fromContainerImage != nil {
7070
let imageName = fromContainerImage ?? versionsConfiguration.swiftBaseDockerImage
7171
targetSwiftSource = .docker(baseSwiftDockerImage: imageName)
7272
} else {

0 commit comments

Comments
 (0)