Docker : Step-by-step guide on how to run the Docker container and open the Airflow UI:

  1. First, build the Docker image from the Dockerfile you provided, if you haven’t already. Make sure your Dockerfile is located in your current working directory. In your terminal, run:
docker build -t my-airflow-image .

Replace my-airflow-image witha name you prefer for your Docker image.

  1. Once the image is built, you can run a Docker container from it. The following command will run the container and map the default Airflow webserver port (8080) to the host machine:
docker run -d --name my-airflow-container -p 8080:8080 my-airflow-image

Replace my-airflow-container with a name you prefer for your Docker container.

  1. To check if the container is running, use the following command:
docker ps

You should see your container listed with the name you provided.

  1. Now, the Airflow webserver should be running on port 8080 of your host machine. Open a web browser and navigate to:
http://localhost:8080

You should see the Airflow UI.

Please note that this guide assumes you have a functional Airflow installation within the Docker image. If you encounter any issues, you might need to review your Dockerfile and make sure all the necessary configurations and dependencies for Airflow are set up properly.

Author: user

Leave a Reply