-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (25 loc) · 839 Bytes
/
Dockerfile
File metadata and controls
31 lines (25 loc) · 839 Bytes
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
# Start with the official Apache Airflow image
FROM apache/airflow:2.7.1-python3.9
# Set the working directory
WORKDIR /opt/airflow
# Install system dependencies required for building Python packages
USER root
RUN apt-get update && apt-get install -y \
build-essential \
gcc \
python3-dev \
libpq-dev \
&& apt-get clean
# Copy the requirements.txt into the container
COPY requirements.txt /opt/airflow/requirements.txt
# Install Python dependencies from requirements.txt
USER airflow
#RUN pip install --no-cache-dir -r /opt/airflow/requirements.txt
# Upgrade pip and install dependencies
RUN pip install --upgrade pip setuptools wheel
RUN pip install praw
#RUN pip install --no-cache-dir -r requirements.txt
# Expose necessary ports (Airflow UI)
EXPOSE 8081
# Set the default command
CMD ["airflow", "webserver"]