Skip to content

Commit d4f5fc6

Browse files
committed
fix: docker and podman are optional for image analysis
1 parent f33a7eb commit d4f5fc6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/com/redhat/exhort/image/ImageUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ public static JsonNode generateImageSBOM(ImageRef imageRef)
131131

132132
static Operations.ProcessExecOutput execSyft(ImageRef imageRef) {
133133
var syft = Operations.getExecutable(SYFT, ARG_VERSION);
134-
var docker = Operations.getExecutable(DOCKER, ARG_VERSION);
135-
var podman = Operations.getExecutable(PODMAN, ARG_VERSION);
134+
var docker = Operations.getCustomPathOrElse(DOCKER);
135+
var podman = Operations.getCustomPathOrElse(PODMAN);
136136

137137
var syftConfigPath = Environment.get(EXHORT_SYFT_CONFIG_PATH, "");
138138
var imageSource = Environment.get(EXHORT_SYFT_IMAGE_SOURCE, "");
@@ -238,7 +238,7 @@ public static Platform getImagePlatform() {
238238
}
239239

240240
static String hostInfo(String engine, String info) {
241-
var exec = Operations.getExecutable(engine, ARG_VERSION);
241+
var exec = Operations.getCustomPathOrElse(engine);
242242
var cmd = new String[] {exec, "info"};
243243

244244
var output = Operations.runProcessGetFullOutput(null, cmd, null);

0 commit comments

Comments
 (0)