Docker Community Forums

Share and learn in the Docker community.

Running PHP scripts on Synology from within Docker container

Yesterday I had to move my Domoticz/jadahl/Synology setup to one that runs in a Docker container. While this didn’t give any problems, I have one issue. Domoticz allows scripts to be executed when a switch is toggled. I have been running PHP scripts for years this way and I was wondering if it is possible to run a script located on the Synology from the Docker container.

So what I’m basically trying to run is “script:///usr/local/bin/php /path/to/script.php”

Totally new to Docker so forgive any stupid questions.

Hi

The way you can do it is to mount the directory where the php scripts is, into your container

Also posted on Reddit, with responses. (The forum’s spam detection was actually triggered for this very topic yesterday, but at that time Google did not show the post on Reddit yet. :frowning:)

Solved this by creating my own image:

FROM domoticz/domoticz:latest
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install etherwake wget curl php-cli php-xml php-soap -y

1 Like