# Use the official Apache Airflow image as the base image FROM apache/airflow:2.9.2 # # Set environment variables for Airflow # ENV AIRFLOW_HOME=/opt/airflow # ENV AIRFLOW__CORE__LOAD_EXAMPLES=False # ENV AIRFLOW__WEBSERVER__PORT=7860 # # Install additional packages if needed # COPY requirements.txt . # RUN pip install apache-airflow==2.9.2 --no-cache-dir -r requirements.txt # # RUN chown -R airflow:airflow $AIRFLOW_HOME # # Expose the port for the webserver # EXPOSE 7860 # # Initialize the database and create an admin user # # RUN airflow db init && \ # # airflow users create \ # # --username admin \ # # --firstname Admin \ # # --lastname User \ # # --role Admin \ # # --email admin@example.com \ # # --password admin # # Command to run the webserver and scheduler # # CMD ["sh", "-c", "airflow webserver --port 7860 & airflow scheduler"] # # CMD /bin/bash -c "airflow webserver --port 7860 & airflow scheduler" # COPY --chown=1000 entrypoint.sh /entrypoint.sh # # RUN chmod +x /app/entrypoint.sh # # # Set the entrypoint to the script # # ENTRYPOINT ["/app/entrypoint.sh"] # RUN curl -fsSL https://deb.nodesource.com/setup_20.x | /bin/bash - # USER airflow # ENTRYPOINT ["/bin/bash"] # CMD ["/entrypoint.sh"]