Download files with Rsync+SSH in Docker/PHP

  docker, php, rsync, ssh

I have PHP installed as a Docker container, and I want to make my PHP script download files from a remote server with Rsync+SSH.

Now, I tried the exec() PHP function, but I lost the last few days trying make it work. I just get a ‘Permission denied’ error in the browser. It works when PHP is installed directly in the system (no Docker), but I have to use PHP as a Docker container.

So my question is: is there any other way I can make it work? Maybe there’s some Docker image allowing this?

I’m currently trying to run rsync as a deamon in Docker container…

Source: Docker Questions