Runtime.getRuntime().exec on host from inside a Docker process
I have a Java program that runs inside a Docker container. This program needs to execute a shell command that should be run by the host system, but just calling
Runtime.getRuntime().exec(...) executes it inside the Docker container (as it should be).
Is there a way I can start a process from inside a container so the process runs outside? I suspect that the exec command should go via Docker to tell it that the command itself needs to be run on the host, but I’m not sure how to do that.