1- <<<<<<< HEAD
21FROM --platform=linux/amd64 apache/airflow:2.9.1
32
43# Chrome 설치는 루트 권한이 필요하므로
54USER root
65
7- # 필수 패키지 설치
86RUN apt-get update && apt-get install -y \
97 wget \
108 gnupg2 \
@@ -26,93 +24,24 @@ RUN apt-get update && apt-get install -y \
2624 xdg-utils \
2725 --no-install-recommends
2826
29- # Chrome 설치
27+ # deb 파일 직접 다운로드 및 설치
28+ # RUN wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb && \
29+ # dpkg -i google-chrome-stable_114.0.5735.106-1_amd64.deb || true && \
30+ # apt-get install -f -y && \
31+ # rm google-chrome-stable_114.0.5735.106-1_amd64.deb
32+
3033RUN wget https://mirror.cs.uchicago.edu/google-chrome/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb && \
3134 dpkg -i google-chrome-stable_114.0.5735.90-1_amd64.deb || true && \
3235 apt-get install -f -y && \
3336 rm google-chrome-stable_114.0.5735.90-1_amd64.deb
3437
35- # ChromeDriver 설치
3638RUN wget https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip && \
3739 unzip chromedriver_linux64.zip && \
3840 mv chromedriver /usr/local/bin/ && \
3941 rm chromedriver_linux64.zip
4042
41- # airflow 유저로 전환 pip install
4243USER airflow
44+
4345COPY requirements.txt .
4446RUN pip install --no-cache-dir -r requirements.txt
4547
46- # 권한 설정 위해 root로 다시 전환
47- USER root
48-
49- # airflow 사용자가 sb.uc_open_with_reconnect 사용할 수 있도록 권한 설정
50- # RUN mkdir -p /home/airflow/.local/lib/python3.12/site-packages/seleniumbase/drivers && \
51- # chown -R airflow /home/airflow/.local/lib/python3.12/site-packages/seleniumbase/drivers && \
52- # chmod -R 755 /home/airflow/.local/lib/python3.12/site-packages/seleniumbase/drivers
53-
54- # ✅ UC_DRIVER_PATH 지정 경로 생성 + 권한 부여
55- RUN mkdir -p /opt/airflow/uc_driver && \
56- chmod -R 777 /opt/airflow/uc_driver
57-
58- # ✅ fallback 경로도 강제로 생성 + 권한 부여 (SeleniumBase 내부 fallback 방지용)
59- RUN mkdir -p /home/airflow/.local/lib/python3.12/site-packages/seleniumbase/drivers && \
60- chmod -R 777 /home/airflow/.local/lib/python3.12/site-packages/seleniumbase/drivers
61-
62- # ✅ 전역 환경변수 설정 추가
63- ENV UC_DRIVER_PATH=/opt/airflow/uc_driver
64-
65- # airflow 유저로 다시 전환
66- USER airflow
67-
68- # COPY requirements.txt .
69- # RUN pip install --no-cache-dir -r requirements.txt
70- =======
71- FROM --platform=linux/amd64 apache/airflow:2.9.1
72-
73- # Chrome 설치는 루트 권한이 필요하므로
74- USER root
75-
76- RUN apt-get update && apt-get install -y \
77- wget \
78- gnupg2 \
79- curl \
80- unzip \
81- fonts-liberation \
82- libappindicator3-1 \
83- libasound2 \
84- libatk-bridge2.0-0 \
85- libatk1.0-0 \
86- libcups2 \
87- libdbus-1-3 \
88- libgdk-pixbuf2.0-0 \
89- libnspr4 \
90- libnss3 \
91- libxcomposite1 \
92- libxdamage1 \
93- libxrandr2 \
94- xdg-utils \
95- --no-install-recommends
96-
97- # deb 파일 직접 다운로드 및 설치
98- # RUN wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb && \
99- # dpkg -i google-chrome-stable_114.0.5735.106-1_amd64.deb || true && \
100- # apt-get install -f -y && \
101- # rm google-chrome-stable_114.0.5735.106-1_amd64.deb
102-
103- RUN wget https://mirror.cs.uchicago.edu/google-chrome/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb && \
104- dpkg -i google-chrome-stable_114.0.5735.90-1_amd64.deb || true && \
105- apt-get install -f -y && \
106- rm google-chrome-stable_114.0.5735.90-1_amd64.deb
107-
108- RUN wget https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip && \
109- unzip chromedriver_linux64.zip && \
110- mv chromedriver /usr/local/bin/ && \
111- rm chromedriver_linux64.zip
112-
113- USER airflow
114-
115- COPY requirements.txt .
116- RUN pip install --no-cache-dir -r requirements.txt
117-
118- >>>>>>> 7da0b8b0ffb468686e450409f4f459806908966d
0 commit comments