Skip to content

Commit e55a8a6

Browse files
authored
fix: docker and podman are optional for image analysis (#173)
## Description fix: docker and podman are optional for image analysis >Optionally, set the full path of the Docker or Podman executable. Syft will attempt to find the images in the Docker or Podman daemon with the executable. Otherwise, Syft will try direct remote registry access. **Related issue (if any):** fixes #issue_number_goes_here ## Checklist - [x] I have followed this repository's contributing guidelines. - [x] I will adhere to the project's code of conduct.
1 parent 8c20764 commit e55a8a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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)