protected function formatRunCommand(array $commands)
    {
        $last = end($commands);

        return 'RUN ' . implode("\r\n  && ", array_map(
            function ($value) use ($last) {
                return $last !== $value ? "{$value} \\" : $value;
            },
            $commands
        ));
    }
protected function formatRunCommand(array $commands)
    {
        $last = end($commands);

        return 'RUN ' . implode("\r\n  && ", array_map(
            function ($value) use ($last) {
                return $last !== $value ? "{$value} \\" : $value;
            },
            $commands
        ));
    }
protected function formatRunCommand ( array $ commands ) { $ last = end ( $ commands ) ; return 'RUN ' . implode ( "\r\n  && " , array_map ( function ( $ value ) use ( $ last ) { return $ last !== $ value ? "{$value} \\" : $ value ; } , $ commands ) ) ; }
Format command into a docker run statement.

@param array $commands
@return string
Format command into a docker run statement .