Eurosmart commited on
Commit
8935f1a
·
1 Parent(s): 2700879
Files changed (1) hide show
  1. Dockerfile +12 -4
Dockerfile CHANGED
@@ -1,14 +1,22 @@
1
  # Use the official Apache Airflow image as the base
2
  FROM apache/airflow:2.2.2-python3.9
3
 
 
 
 
 
 
 
 
 
4
  # Set the working directory
5
  WORKDIR /opt/airflow
6
 
7
  # Copy necessary files into the container
8
- COPY requirements.txt .
9
- COPY entrypoint.sh /entrypoint.sh
10
- COPY dags/ dags/
11
- COPY config/ config/
12
 
13
  # Install Python dependencies
14
  RUN pip install --no-cache-dir -r requirements.txt
 
1
  # Use the official Apache Airflow image as the base
2
  FROM apache/airflow:2.2.2-python3.9
3
 
4
+ # Set up a new user named "user" with user ID 1000
5
+ RUN useradd -m -u 1000 user
6
+
7
+ USER user
8
+
9
+ ENV HOME=/home/user \
10
+ PATH=/home/user/.local/bin:$PATH
11
+
12
  # Set the working directory
13
  WORKDIR /opt/airflow
14
 
15
  # Copy necessary files into the container
16
+ COPY --chown=user requirements.txt .
17
+ COPY --chown=user entrypoint.sh /entrypoint.sh
18
+ COPY --chown=user dags/ dags/
19
+ COPY --chown=user config/ config/
20
 
21
  # Install Python dependencies
22
  RUN pip install --no-cache-dir -r requirements.txt