Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +12 -8
Dockerfile
CHANGED
@@ -10,19 +10,21 @@ ENV AIRFLOW__WEBSERVER__PORT=7860
|
|
10 |
COPY requirements.txt .
|
11 |
RUN pip install apache-airflow==2.9.2 --no-cache-dir -r requirements.txt
|
12 |
|
|
|
|
|
13 |
|
14 |
# Expose the port for the webserver
|
15 |
EXPOSE 7860
|
16 |
|
17 |
# Initialize the database and create an admin user
|
18 |
-
RUN airflow db init && \
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
|
27 |
# Command to run the webserver and scheduler
|
28 |
# CMD ["sh", "-c", "airflow webserver --port 7860 & airflow scheduler"]
|
@@ -36,5 +38,7 @@ COPY --chown=1000 entrypoint.sh /entrypoint.sh
|
|
36 |
# ENTRYPOINT ["/app/entrypoint.sh"]
|
37 |
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | /bin/bash -
|
38 |
|
|
|
|
|
39 |
ENTRYPOINT ["/bin/bash"]
|
40 |
CMD ["/entrypoint.sh"]
|
|
|
10 |
COPY requirements.txt .
|
11 |
RUN pip install apache-airflow==2.9.2 --no-cache-dir -r requirements.txt
|
12 |
|
13 |
+
RUN chown -R airflow:airflow $AIRFLOW_HOME
|
14 |
+
|
15 |
|
16 |
# Expose the port for the webserver
|
17 |
EXPOSE 7860
|
18 |
|
19 |
# Initialize the database and create an admin user
|
20 |
+
# RUN airflow db init && \
|
21 |
+
# airflow users create \
|
22 |
+
# --username admin \
|
23 |
+
# --firstname Admin \
|
24 |
+
# --lastname User \
|
25 |
+
# --role Admin \
|
26 |
+
# --email admin@example.com \
|
27 |
+
# --password admin
|
28 |
|
29 |
# Command to run the webserver and scheduler
|
30 |
# CMD ["sh", "-c", "airflow webserver --port 7860 & airflow scheduler"]
|
|
|
38 |
# ENTRYPOINT ["/app/entrypoint.sh"]
|
39 |
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | /bin/bash -
|
40 |
|
41 |
+
USER airflow
|
42 |
+
|
43 |
ENTRYPOINT ["/bin/bash"]
|
44 |
CMD ["/entrypoint.sh"]
|