# Use the official Apache Airflow image as the base FROM apache/airflow:2.2.2-python3.9 # Set up a new user named "user" with user ID 1000 # RUN useradd -m -u 1000 user # Set the working directory WORKDIR /opt/airflow # Copy necessary files into the container COPY --chown=user requirements.txt . COPY --chown=user entrypoint.sh /entrypoint.sh COPY --chown=user dags/ dags/ COPY --chown=user config/ config/ # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Set environment variables (if not using Render's built-in environment management) ENV PATH=/home/user/.local/bin:$PATH ENV AIRFLOW_HOME=/opt/airflow ENV AIRFLOW__CORE__LOAD_EXAMPLES=False ENV AIRFLOW__CORE__DAGS_FOLDER=/opt/airflow/dags # Expose Airflow's webserver port EXPOSE 8080 # Run the entrypoint script when the container starts ENTRYPOINT ["/entrypoint.sh"]