Spaces:
Runtime error
Runtime error
File size: 869 Bytes
2700879 8935f1a 946d596 8935f1a 2700879 8935f1a 2700879 5a7b53b 2700879 74478ad 5a7b53b 2700879 |
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 |
# 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"]
|