Skip to content

Commit

Permalink
Remove unnecessary --pull parameter when running builder images
Browse files Browse the repository at this point in the history
Follows up on quarkusio#33749.

I forgot to remove this code that was just a remainder of an earlier
approach which didn't go anywhere
(quarkusio#33691 (comment)).

Keeping this code could in theory lead to extra pulls when using
quarkus.native.build-image.pull='always' (the default) and the image
gets updated right while we're building, but more importantly it could
lead to extra, unecessary queries to quay.io, so let's avoid that.
  • Loading branch information
yrodiere authored and sberyozkin committed Jun 21, 2023
1 parent 35af2b6 commit cb06f2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -495,20 +495,14 @@ enum ImagePullStrategy {
/**
* Always pull the most recent image.
*/
ALWAYS("always"),
ALWAYS,
/**
* Only pull the image if it's missing locally.
*/
MISSING("missing"),
MISSING,
/**
* Never pull any image; fail if the image is missing locally.
*/
NEVER("never");

public final String commandLineParamValue;

ImagePullStrategy(String commandLineParamValue) {
this.commandLineParamValue = commandLineParamValue;
}
NEVER
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ protected NativeImageBuildContainerRunner(NativeConfig nativeConfig) {
this.nativeConfig = nativeConfig;
containerRuntime = nativeConfig.containerRuntime().orElseGet(ContainerRuntimeUtil::detectContainerRuntime);

this.baseContainerRuntimeArgs = new String[] { "--env", "LANG=C", "--rm",
"--pull", nativeConfig.builderImage().pull().commandLineParamValue };
this.baseContainerRuntimeArgs = new String[] { "--env", "LANG=C", "--rm" };

containerName = "build-native-" + RandomStringUtils.random(5, true, false);
}
Expand Down

0 comments on commit cb06f2b

Please sign in to comment.