Skip to content

Resolve docker executable to an absolute path - #7

Merged
RuslanLomaka merged 1 commit into
masterfrom
fix/docker-path-resolution
Aug 18, 2026
Merged

Resolve docker executable to an absolute path#7
RuslanLomaka merged 1 commit into
masterfrom
fix/docker-path-resolution

Conversation

@RuslanLomaka

Copy link
Copy Markdown
Owner

Every ProcessBuilder call invoked docker via a bare command name, relying on the process's PATH to resolve it (Sonar java:S4036). Add DockerExecutable, which scans PATH once at class-load time and caches the resolved absolute path, so later invocations use a fixed path instead of re-resolving through PATH each time. Portable across the Windows dev machine and the Linux Pi since it resolves at runtime rather than hardcoding an OS-specific path.

Verified compile/checkstyle/full build pass, and confirmed the resolved absolute path runs identically to the bare command on the production Pi.

Every ProcessBuilder call invoked docker via a bare command name,
relying on the process's PATH to resolve it (Sonar java:S4036). Add
DockerExecutable, which scans PATH once at class-load time and caches
the resolved absolute path, so later invocations use a fixed path
instead of re-resolving through PATH each time. Portable across the
Windows dev machine and the Linux Pi since it resolves at runtime
rather than hardcoding an OS-specific path.

Verified compile/checkstyle/full build pass, and confirmed the
resolved absolute path runs identically to the bare command on the
production Pi.
@sonarqubecloud

Copy link
Copy Markdown

@RuslanLomaka
RuslanLomaka merged commit f9b1795 into master Aug 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant