Code of Dockerfile is here
FROM php:7.0-cli
COPY ./ /
Code of create.php is here
<?php
$fp = fopen($argv[1],'wa+');
fwrite($fp,'sample');
fclose($fp);
?>
I build my docker using following command in debian - stretch
docker build -t create-tool .
I run it using following command in debian - stretch
docker run create-tool php create.php /home/user1/Desktop/test
But it is not creating the file, instead it throws the error "failed to open stream".