Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +30 -30
Dockerfile
CHANGED
@@ -1,45 +1,45 @@
|
|
1 |
# Use the official Apache Airflow image as the base image
|
2 |
FROM apache/airflow:2.9.2
|
3 |
|
4 |
-
# Set environment variables for Airflow
|
5 |
-
ENV AIRFLOW_HOME=/opt/airflow
|
6 |
-
ENV AIRFLOW__CORE__LOAD_EXAMPLES=False
|
7 |
-
ENV AIRFLOW__WEBSERVER__PORT=7860
|
8 |
|
9 |
|
10 |
-
# Install additional packages if needed
|
11 |
-
COPY requirements.txt .
|
12 |
-
RUN pip install apache-airflow==2.9.2 --no-cache-dir -r requirements.txt
|
13 |
|
14 |
-
# RUN chown -R airflow:airflow $AIRFLOW_HOME
|
15 |
|
16 |
|
17 |
-
# Expose the port for the webserver
|
18 |
-
EXPOSE 7860
|
19 |
|
20 |
-
# Initialize the database and create an admin user
|
21 |
-
# RUN airflow db init && \
|
22 |
-
# airflow users create \
|
23 |
-
# --username admin \
|
24 |
-
# --firstname Admin \
|
25 |
-
# --lastname User \
|
26 |
-
# --role Admin \
|
27 |
-
# --email admin@example.com \
|
28 |
-
# --password admin
|
29 |
|
30 |
-
# Command to run the webserver and scheduler
|
31 |
-
# CMD ["sh", "-c", "airflow webserver --port 7860 & airflow scheduler"]
|
32 |
-
# CMD /bin/bash -c "airflow webserver --port 7860 & airflow scheduler"
|
33 |
|
34 |
-
COPY --chown=1000 entrypoint.sh /entrypoint.sh
|
35 |
|
36 |
-
# RUN chmod +x /app/entrypoint.sh
|
37 |
|
38 |
-
# # Set the entrypoint to the script
|
39 |
-
# ENTRYPOINT ["/app/entrypoint.sh"]
|
40 |
-
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | /bin/bash -
|
41 |
|
42 |
-
USER airflow
|
43 |
|
44 |
-
ENTRYPOINT ["/bin/bash"]
|
45 |
-
CMD ["/entrypoint.sh"]
|
|
|
1 |
# Use the official Apache Airflow image as the base image
|
2 |
FROM apache/airflow:2.9.2
|
3 |
|
4 |
+
# # Set environment variables for Airflow
|
5 |
+
# ENV AIRFLOW_HOME=/opt/airflow
|
6 |
+
# ENV AIRFLOW__CORE__LOAD_EXAMPLES=False
|
7 |
+
# ENV AIRFLOW__WEBSERVER__PORT=7860
|
8 |
|
9 |
|
10 |
+
# # Install additional packages if needed
|
11 |
+
# COPY requirements.txt .
|
12 |
+
# RUN pip install apache-airflow==2.9.2 --no-cache-dir -r requirements.txt
|
13 |
|
14 |
+
# # RUN chown -R airflow:airflow $AIRFLOW_HOME
|
15 |
|
16 |
|
17 |
+
# # Expose the port for the webserver
|
18 |
+
# EXPOSE 7860
|
19 |
|
20 |
+
# # Initialize the database and create an admin user
|
21 |
+
# # RUN airflow db init && \
|
22 |
+
# # airflow users create \
|
23 |
+
# # --username admin \
|
24 |
+
# # --firstname Admin \
|
25 |
+
# # --lastname User \
|
26 |
+
# # --role Admin \
|
27 |
+
# # --email admin@example.com \
|
28 |
+
# # --password admin
|
29 |
|
30 |
+
# # Command to run the webserver and scheduler
|
31 |
+
# # CMD ["sh", "-c", "airflow webserver --port 7860 & airflow scheduler"]
|
32 |
+
# # CMD /bin/bash -c "airflow webserver --port 7860 & airflow scheduler"
|
33 |
|
34 |
+
# COPY --chown=1000 entrypoint.sh /entrypoint.sh
|
35 |
|
36 |
+
# # RUN chmod +x /app/entrypoint.sh
|
37 |
|
38 |
+
# # # Set the entrypoint to the script
|
39 |
+
# # ENTRYPOINT ["/app/entrypoint.sh"]
|
40 |
+
# RUN curl -fsSL https://deb.nodesource.com/setup_20.x | /bin/bash -
|
41 |
|
42 |
+
# USER airflow
|
43 |
|
44 |
+
# ENTRYPOINT ["/bin/bash"]
|
45 |
+
# CMD ["/entrypoint.sh"]
|