# Running workflows with Airflow (Docker)

**URL:** <https://forum.knime.com/t/running-workflows-with-airflow-docker/81747>\
**Category:** KNIME Analytics Platform\
**Tags:** workflow\
**Created:** [August 1, 2024, 3:59pm UTC](https://forum.knime.com/t/running-workflows-with-airflow-docker/81747 "2024-08-01T15:59:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fernandostahelin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/fernandostahelin/32/71349_2.png) [@fernandostahelin](https://forum.knime.com/u/fernandostahelin)\
**Post date:** [August 1, 2024, 3:59pm UTC](https://forum.knime.com/t/running-workflows-with-airflow-docker/81747/1 "2024-08-01T15:59:43Z")

</div>

Hello people.

I’ve seen some people here asking whether or not it’s possible run workflows using Airflow - a well know orchestration tool - and yes, **it is.**

**Summary:**  
**1. Spin up airflow with Docker**  
(I used the docker-compose.yml file that you can find in Airflow’s doc, very handy) [https://airflow.apache.org/docs/apache-airflow/stable/docker-compose.yaml](https://airflow.apache.org/docs/apache-airflow/stable/docker-compose.yaml)

**2. Edit the docker-compose.yaml file**  
include 2 folders as volumes for Airflow be able to “see” your files

- Your workflow (file or directory), or folder with workflows  
For example, you could share “C:/knime\_workflows” with docker, and assign a directory inside of linux to be: “/opt/knime/knime\_workflows”  
Docker won’t copy the files, it will just mount on the provided folder

- A folder with KNIME Linux version inside of it.  
Remember, docker runs on linux, so you most provide an executable for linux. Download the .tag.gz file you can find on KNIME’s website, and unzip it, like below.  
tar -xzf /opt/knime\_\<knime\_ver\>.linux.gtk.x86\_64.tar.gz -C /opt  
Now you have a directory with knime inside of it.

For the sake of demonstration, here is the docker-compose.yml file i’ve used, properly assigning the correct directories.  
[docker-compose.yml](https://forum.knime.com/uploads/short-url/7SJC9gvPhWbfBgBMfxQMIX0d1dM.yml) (11.5 KB)

**2. Build and spin up the containers**  
(“docker compose up -d” in the same directory you have the docker-compose file)

**3. Test the execution through command line**  
/opt/knime\_4.5.3/knime -consoleLog -application org.knime.product.KNIME\_BATCH\_APPLICATION -workflowDir=“/opt/knime/knime\_workflows/\<your\_workflow\_name\_goes\_here\>”

**4. Build your dag**  
Now comes the Airflow part. I’m not going to explain it since I’m not an Airflow specialist  
**5.Have fun 🙂**  
In case you want to see it working:  
[Demo Video](https://www.loom.com/share/a7d890bb275e4916bea2ea72a6922ce7?sid=02b266df-67d1-4d34-8e18-ef387aa9281f)

Thanks!

---

<div class="post-metadata">

**Author:** ![mwiegand](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mwiegand/32/66896_2.png) [@mwiegand](https://forum.knime.com/u/mwiegand)\
**Post date:** [September 23, 2024, 10:11am UTC](https://forum.knime.com/t/running-workflows-with-airflow-docker/81747/2 "2024-09-23T10:11:44Z")

</div>

Interesting 🙂 Just for cross reference, as you utilize batch mode, here is a nice article from @mlauber71 detailing out everything there is to know about it:

> **[KNIME Batch Processing on Windows and MacOS](https://medium.com/low-code-for-advanced-data-science/knime-batch-processing-on-windows-and-macos-caacde067bd0)**
>
> The DIY guide to workflow automation

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [December 22, 2024, 10:12am UTC](https://forum.knime.com/t/running-workflows-with-airflow-docker/81747/3 "2024-12-22T10:12:44Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
