-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quarkus NativeImageBuildStep fails with perm denied with docker rootless
- Loading branch information
1 parent
3f51f74
commit 0c47727
Showing
3 changed files
with
104 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
core/deployment/src/main/java/io/quarkus/deployment/OutputFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package io.quarkus.deployment; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.InputStreamReader; | ||
import java.util.function.Function; | ||
|
||
public class OutputFilter implements Function<InputStream, Runnable> { | ||
private final StringBuilder builder = new StringBuilder(); | ||
|
||
@Override | ||
public Runnable apply(InputStream is) { | ||
return () -> { | ||
|
||
try (InputStreamReader isr = new InputStreamReader(is); | ||
BufferedReader reader = new BufferedReader(isr)) { | ||
|
||
for (String line = reader.readLine(); line != null; line = reader.readLine()) { | ||
builder.append(line); | ||
} | ||
} catch (IOException e) { | ||
throw new RuntimeException("Error reading stream.", e); | ||
} | ||
}; | ||
} | ||
|
||
public String getOutput() { | ||
return builder.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters