title: Running a Node.js script using a bash command in Airflow and Docker
body: <p>I'm trying to schedule some node.js scripts using Airflow.</p>
  <p>I've managed to successfully set up Airflow in a Docker container using the puckel Airflow image (<a href="https://github.com/puckel/docker-airflow" rel="nofollow noreferrer">https://github.com/puckel/docker-airflow</a>), and have gotten a sample HelloWorld DAG to work using this setup.</p>
  <p>At the moment, I'm setting up each task in the DAG to run a separate node.js script using the below format:</p>
  <pre><code>t1 = BashOperator(
       task_id = &quot;runNodeJsScript&quot;
       bash_command = &quot;/path/to/node/modules/on/virtual/machine  /path/to/external/nodejs/script/on/virtual/machine&quot;
       dag = dag
  )
  </code></pre>
  <p>But when I test out the tasks using the &quot;Airflow test&quot; method, I get the error &quot;Bash Command Failed.&quot;</p>
  <p>Is there something missing in the above code? Do I need to add something like #!/bin/bash to the command or the node.js script to get it to work?</p>
  <p>Thanks in advance!</p>