title: Docker run script in host on docker-compose up
body: <p>My question relates to best practices on how to run a script on a docker-compose up directive.</p>
  <p>Currently I'm sharing a volume between host and container to allow for the script changes to be visible to both host and container.
  Similar to a watching script polling for changes on configuration file. The script has to act on host on changes according to predefined rules.</p>
  <p>How could I start this script on a docker-compose up directive or even from the Dockerfile of the service, so that whenever the container goes up the &quot;watcher&quot; can find any changes being made and writing to.</p>
  <p>The container in question will always run over a Debian / Ubuntu OS and should be architecture independent, meaning it should be able to run on ARM as well.</p>
  <p>I wish to run a script on the Host, not inside the container. I need the Host to change its network interface configurations to easily adapt any environment The HOST needs to change I repeat.. This should be seamless to the user, and easily editable on a Web interface running Inside a CONTAINER to adapt to new environments.</p>
  <p>I currently do this with a script running on the host based on crontab. I just wish to know the best practices and examples of how to run a script on HOST from INSIDE a CONTAINER, so that the deploy can be as easy for the installing operator to just run docker-compose up.</p>