Spaces:
Runtime error
Runtime error
File size: 1,147 Bytes
39e0c14 0821466 39e0c14 02d937f 0821466 66b74ab 39e0c14 8f286c6 39e0c14 8f286c6 64da360 19887d2 28f92e7 19887d2 84d2ae9 19887d2 84d2ae9 28f92e7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# 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
# 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 -
ENTRYPOINT ["/bin/bash"]
CMD ["/entrypoint.sh"]
|