Class NativeImageBuildLocalContainerRunner


public class NativeImageBuildLocalContainerRunner extends NativeImageBuildContainerRunner
  • Constructor Details

    • NativeImageBuildLocalContainerRunner

      public NativeImageBuildLocalContainerRunner(NativeConfig nativeConfig)
  • Method Details

    • getVolumeAccessArguments

      public static List<String> getVolumeAccessArguments(ContainerRuntimeUtil.ContainerRuntime containerRuntime, String image)
      Returns the container runtime arguments needed to ensure that files written to a bind-mounted volume on the host are owned by the real host user.

      The UID/GID of the running user inside image is detected dynamically via ContainerUserResolver so that any container image works correctly, regardless of which user it declares. When detection fails, Podman falls back to --user with the host UID/GID (and --userns=keep-id for rootless Podman).

      Parameters:
      containerRuntime - the detected container runtime
      image - the container image that will be run (used for UID/GID detection)
      Returns:
      the list of extra run arguments, or an empty list when not applicable
    • getContainerRuntimeBuildArgs

      protected List<String> getContainerRuntimeBuildArgs(Path outputDir)
      Overrides:
      getContainerRuntimeBuildArgs in class NativeImageBuildContainerRunner
    • addVolumeParameter

      public static void addVolumeParameter(String localPath, String remotePath, List<String> args, ContainerRuntimeUtil.ContainerRuntime containerRuntime)