Skip to content

Commit

Permalink
Support Docker Desktop for building native executables
Browse files Browse the repository at this point in the history
Treat Docker Desktop as "rootless" since the way it binds mounts does
not transparently map the host user ID and GID see
https://docs.docker.com/desktop/faqs/linuxfaqs/#how-do-i-enable-file-sharing

Closes quarkusio#37193
  • Loading branch information
zakkak committed Nov 21, 2023
1 parent d443437 commit 81818c7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ private static boolean getRootlessStateFor(ContainerRuntime containerRuntime) {
final Predicate<String> stringPredicate;
// Docker includes just "rootless" under SecurityOptions, while podman includes "rootless: <boolean>"
if (containerRuntime == ContainerRuntime.DOCKER) {
stringPredicate = line -> line.trim().equals("rootless");
// We also treat Docker Desktop as "rootless" since the way it binds mounts does not
// transparently map the host user ID and GID
// see https://docs.docker.com/desktop/faqs/linuxfaqs/#how-do-i-enable-file-sharing
stringPredicate = line -> line.trim().equals("rootless") || line.contains("desktop-linux");
} else {
stringPredicate = line -> line.trim().equals("rootless: true");
}
Expand Down

0 comments on commit 81818c7

Please sign in to comment.