jonathanjordan21 commited on
Commit
62534bf
·
verified ·
1 Parent(s): 46b4efe

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- airflow users create \
20
- --username admin \
21
- --firstname Admin \
22
- --lastname User \
23
- --role Admin \
24
- --email admin@example.com \
25
- --password admin
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"]