Skip to content

Commit e08db84

Browse files
committed
better way to pull
1 parent 820eb62 commit e08db84

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Plugins/AWSLambdaPackager/Plugin.swift

+8-1
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,18 @@ struct AWSLambdaPackager: CommandPlugin {
8686
print("building \"\(packageIdentity)\" in docker")
8787
print("-------------------------------------------------------------------------")
8888

89+
// update the underlying docker image, if necessary
90+
try self.execute(
91+
executable: dockerToolPath,
92+
arguments: ["pull", baseImage],
93+
logLevel: .output
94+
)
95+
8996
// get the build output path
9097
let buildOutputPathCommand = "swift build -c \(buildConfiguration.rawValue) --show-bin-path"
9198
let dockerBuildOutputPath = try self.execute(
9299
executable: dockerToolPath,
93-
arguments: ["run", "--rm", "--pull", "always", "-v", "\(packageDirectory.string):/workspace", "-w", "/workspace", baseImage, "bash", "-cl", buildOutputPathCommand],
100+
arguments: ["run", "--rm", "-v", "\(packageDirectory.string):/workspace", "-w", "/workspace", baseImage, "bash", "-cl", buildOutputPathCommand],
94101
logLevel: verboseLogging ? .debug : .silent
95102
)
96103
guard let buildPathOutput = dockerBuildOutputPath.split(separator: "\n").last else {

0 commit comments

Comments
 (0)