How can I get the output of a docker script from a php script?

0

I have a php script that executes a docker image and waits for it to continue, but it is not implemented asynchronously; therefore I have to wait a while to check if I have an exit or an error. Here goes the code.

$action = "timeout 5m bash script.sh";

exec($action,$result);
        $output = array(
                'publi_err'         => 1,
                'yt_start_error'    => 1,
                'yt_end_error'      => 1,
            );

The problem is that I get the following error before the waiting time:

write /dev/stdout: The pipe is being closed.

Any suggestions?

    
asked by Gabriel 20.03.2017 в 21:49
source

0 answers